Cool6689 commented on code in PR #17292:
URL: https://github.com/apache/iotdb/pull/17292#discussion_r3347350926
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java:
##########
@@ -190,7 +197,27 @@ private static void
verifyIsAggregationDataTypeMatched(String aggrFuncName, TSDa
return;
}
throw new SemanticException(
- "Aggregate functions [AVG, SUM, EXTREME, STDDEV, STDDEV_POP,
STDDEV_SAMP, VARIANCE, VAR_POP, VAR_SAMP] only support numeric data types
[INT32, INT64, FLOAT, DOUBLE]");
+ "Aggregate functions [AVG, SUM, EXTREME, STDDEV, STDDEV_POP,
STDDEV_SAMP, "
+ + "VARIANCE, VAR_POP, VAR_SAMP] only support "
+ + "numeric data types [INT32, INT64, FLOAT, DOUBLE]");
+ case SqlConstant.SKEWNESS:
+ case SqlConstant.KURTOSIS:
+ if (dataType.isNumeric() || TSDataType.TIMESTAMP.equals(dataType)) {
+ return;
+ }
+ throw new SemanticException(
+ "Aggregate functions [SKEWNESS, KURTOSIS] only support "
+ + "numeric data types [INT32, INT64, FLOAT, DOUBLE,
TIMESTAMP]");
+ /**
Review Comment:
Fixed.
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionTypeAnalyzer.java:
##########
@@ -361,6 +361,7 @@ public TSDataType visitFunctionExpression(
}
if (functionExpression.isBuiltInAggregationFunctionExpression()) {
+
Review Comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]