You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/31 02:20:48 UTC

[GitHub] [flink] docete commented on a change in pull request #10722: [FLINK-15421][table-planner-blink] Fix TimestampMaxAggFunction/Timest…

docete commented on a change in pull request #10722: [FLINK-15421][table-planner-blink] Fix TimestampMaxAggFunction/Timest…
URL: https://github.com/apache/flink/pull/10722#discussion_r362136378
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/functions/aggfunctions/MinWithRetractAggFunction.java
 ##########
 @@ -367,13 +368,21 @@ public void retract(MinWithRetractAccumulator<BinaryString> acc, BinaryString va
 	/**
 	 * Built-in Timestamp Min with retraction aggregate function.
 	 */
-	public static class TimestampMinWithRetractAggFunction extends MinWithRetractAggFunction<Timestamp> {
+	public static class TimestampMinWithRetractAggFunction extends MinWithRetractAggFunction<SqlTimestamp> {
 
 		private static final long serialVersionUID = -7494198823345305907L;
 
+		public void accumulate(MinWithRetractAccumulator<SqlTimestamp> acc, SqlTimestamp value) throws Exception {
+			super.accumulate(acc, value);
+		}
+
+		public void retract(MinWithRetractAccumulator<SqlTimestamp> acc, SqlTimestamp value) throws Exception {
+			super.retract(acc, value);
+		}
+
 		@Override
-		protected TypeInformation<Timestamp> getValueTypeInfo() {
-			return Types.SQL_TIMESTAMP;
+		protected TypeInformation<SqlTimestamp> getValueTypeInfo() {
+			return new SqlTimestampTypeInfo(3);
 
 Review comment:
   Actually the TimestampMaxWithRetractAggFunction/TimestampMinWithRetractAggFunction are not support high precision(larger than 3) now. We check this in `AggFunctionFactory`.
   But let them support high precision in this PR is OK to me.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services