lsyldliu commented on code in PR #21629:
URL: https://github.com/apache/flink/pull/21629#discussion_r1067108838
##########
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:
For the `TIMESTAMP_WITHOUT_TIME_ZONE ` type, hive sum udaf supports it, but
flink can't support, but for default case type, hive sum udaf and flink both
can't support it, so I think should distinguish these two case, the exception
shouldn't be same.
--
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]