slinkydeveloper commented on a change in pull request #17454:
URL: https://github.com/apache/flink/pull/17454#discussion_r733680294



##########
File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/ExprCodeGenerator.scala
##########
@@ -420,7 +419,15 @@ class ExprCodeGenerator(ctx: CodeGeneratorContext, 
nullableInput: Boolean)
       case _ =>
         literal.getValue3
     }
-    generateLiteral(ctx, resultType, value)
+    // Make sure to convert avatica time types to flink internal types
+    val convertedValue = value match {
+      case tu: org.apache.calcite.avatica.util.TimeUnit =>

Review comment:
       We didn't removed the dependency from the planner, just from runtime. 
The planner still depends on avatica-core:
   
   ```
   [INFO] -------------< org.apache.flink:flink-table-planner_2.12 
>--------------
   [INFO] Building Flink : Table : Planner 1.15-SNAPSHOT                   
[11/13]
   [INFO] --------------------------------[ jar 
]---------------------------------
   [INFO] 
   [INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ 
flink-table-planner_2.12 ---
   [...]
   [INFO] +- org.apache.calcite:calcite-core:jar:1.26.0:compile
   [INFO] |  +- org.apache.calcite:calcite-linq4j:jar:1.26.0:compile
   [INFO] |  +- 
com.fasterxml.jackson.core:jackson-annotations:jar:2.12.1:compile
   [INFO] |  +- org.apache.calcite.avatica:avatica-core:jar:1.17.0:compile
   [...]
   ```
   
   Calcite depends on it for some `RexNode` related code.




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