tsreaper commented on a change in pull request #16650:
URL: https://github.com/apache/flink/pull/16650#discussion_r680613521



##########
File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/AggFunctionFactory.scala
##########
@@ -366,7 +366,7 @@ class AggFunctionFactory(
         new LeadLagAggFunction.DoubleLeadLagAggFunction(argTypes.length)
       case BOOLEAN =>
         new LeadLagAggFunction.BooleanLeadLagAggFunction(argTypes.length)
-      case VARCHAR =>
+      case VARCHAR | CHAR =>
         new LeadLagAggFunction.StringLeadLagAggFunction(argTypes.length)

Review comment:
       `LeadLagAggFunction.StringLeadLagAggFunction#getResultType` returns 
`STRING` type, which is a `VARCHAR` type. I think users will not expect feeding 
a `CHAR` into the lead/lag function and getting a `VARCHAR` out. It might be 
better to add a new type of lead/lag function.




-- 
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]


Reply via email to