twalthr commented on a change in pull request #17454:
URL: https://github.com/apache/flink/pull/17454#discussion_r733668870
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java
##########
@@ -62,12 +62,12 @@
* Utility functions for datetime types: date, time, timestamp. Currently, it
is a bit messy putting
* date time functions in various classes because the runtime module does not
depend on calcite..
*/
-public class SqlDateTimeUtils {
+public class DateTimeUtils {
Review comment:
Mark the class as `@Internal`
##########
File path: flink-table/flink-table-runtime/pom.xml
##########
@@ -92,55 +92,6 @@ under the License.
<version>${janino.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.calcite.avatica</groupId>
Review comment:
very nice 👍
##########
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:
didn't we just remove the dependency? how can this still compile?
--
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]