luoyuxia commented on code in PR #21629:
URL: https://github.com/apache/flink/pull/21629#discussion_r1069052691
##########
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/functions/hive/HiveSumAggFunction.java:
##########
@@ -125,10 +126,16 @@ private DataType initResultType(DataType argsType) {
int precision =
Math.min(MAX_PRECISION,
getPrecision(argsType.getLogicalType()) + 10);
return DataTypes.DECIMAL(precision,
getScale(argsType.getLogicalType()));
+ case TIMESTAMP_WITHOUT_TIME_ZONE:
+ throw new TableException(
+ String.format(
+ "Native hive sum aggregate function does not
support type: '%s'. Please set option '%s' to false.",
+ argsType.getLogicalType().getTypeRoot(),
+
TABLE_EXEC_HIVE_NATIVE_AGG_FUNCTION_ENABLED.key()));
default:
throw new TableException(
String.format(
- "Sum aggregate function does not support type:
'%s'. Please re-check the data type.",
+ "Native hive sum aggregate function does not
support type: '%s'. Please re-check the data type.",
Review Comment:
May be we can have a exception message following Hive like:
`"Only numeric or string type arguments are accepted but "
+ parameters[0].getTypeName() + " is passed."`
--
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]