y0908105023 commented on code in PR #20846:
URL: https://github.com/apache/flink/pull/20846#discussion_r979893866
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/StringCallGen.scala:
##########
@@ -190,6 +191,16 @@ object StringCallGen {
isCharacterString(operands(1).resultType) =>
methodGen(BuiltInMethods.STRING_TO_DATE_WITH_FORMAT)
+ case DATE_ADD
+ if operands.size == 2 &&
+ !isCharacterString(operands.head.resultType) =>
+ generateToDateAdd(ctx, operands, returnType)
+
+ case DATE_ADD
+ if operands.size == 2 &&
+ isCharacterString(operands.head.resultType) =>
+ generateToDateAdd(ctx, operands, returnType)
+
Review Comment:
To support string type and date type. eg: date_add(string type, offset) or
date_add(date type, offset)
--
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]