lincoln-lil commented on code in PR #23478:
URL: https://github.com/apache/flink/pull/23478#discussion_r1355984417


##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/utils/ScalarOperatorsTestBase.scala:
##########
@@ -51,6 +53,7 @@ abstract class ScalarOperatorsTestBase extends 
ExpressionTestBase {
     testData.setField(20, "who".getBytes())
     testData.setField(21, localTime("12:34:56"))
     testData.setField(22, localDateTime("1996-11-10 12:34:56"))
+    testData.setField(23, localDateTime("1996-11-10 
12:34:56").atZone(ZoneId.systemDefault()).toInstant)

Review Comment:
   nit: use `tableConfig#getLocalTimeZone` instead of `ZoneId.systemDefault()`



##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala:
##########
@@ -488,6 +488,39 @@ object ScalarOperatorGens {
     else if (isNumeric(left.resultType) && isNumeric(right.resultType)) {
       generateComparison(ctx, "!=", left, right, resultType)
     }
+    // support date/time/timestamp not equalTo string.
+    // for performance, we cast literal string to literal time.
+    else if (isTimePoint(left.resultType) && 
isCharacterString(right.resultType)) {

Review Comment:
   Can we extract common method with `generateEquals` ?



##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala:
##########
@@ -488,6 +488,39 @@ object ScalarOperatorGens {
     else if (isNumeric(left.resultType) && isNumeric(right.resultType)) {
       generateComparison(ctx, "!=", left, right, resultType)
     }
+    // support date/time/timestamp not equalTo string.
+    // for performance, we cast literal string to literal time.
+    else if (isTimePoint(left.resultType) && 
isCharacterString(right.resultType)) {

Review Comment:
   Can we extract common method with `generateEquals` ?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to