public static TSDataType getBuiltInScalarFunctionDataType(
      FunctionExpression functionExpression, TSDataType dataType) {
    String functionName = functionExpression.getFunctionName();
    if (functionName == null) {
      throw new IllegalArgumentException("ScalarFunction Name must not be null.");
    }
    BuiltInScalarFunctionHelper helper =
        BuiltInScalarFunctionHelperFactory.createHelper(functionName);
    // check input data type first if it is not a NullOperand
    if (dataType != null) {
      helper.checkBuiltInScalarFunctionInputDataType(dataType);
    }
    return helper.getBuiltInScalarFunctionReturnType(functionExpression);
  }
Bind Type for non-series input Expressions of AggregationFunction and check Semantic

<p>.e.g COUNT_IF(s1>1, keep>2, 'ignoreNull'='false'), we bind type {@link TSDataType#INT64} for
'keep'
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java