wuchong commented on a change in pull request #8762: 
[FLINK-12844][table-planner-blink] Use default conversion class 
LocalDate/LocalTime/LocalDateTime for DateType/TimeType/TimestampType in blink
URL: https://github.com/apache/flink/pull/8762#discussion_r300914429
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/DataFormatConverters.java
 ##########
 @@ -128,8 +135,21 @@
         *                   lost its specific Java format. Only DataType 
retains all its
         *                   Java format information.
         */
-       @SuppressWarnings("unchecked")
+       @Deprecated
        public static DataFormatConverter getConverterForDataType(DataType 
originDataType) {
+               return getConverterForDataType(originDataType, new 
Context(DEFAULT_TIME_ZONE));
+       }
+
+       /**
+        * Get {@link DataFormatConverter} for {@link DataType}.
+        *
+        * @param originDataType DataFormatConverter is oriented to Java 
format, while LogicalType has
+        *                   lost its specific Java format. Only DataType 
retains all its
+        *                   Java format information.
+        * @param context context for converter.
+        */
+       @SuppressWarnings("unchecked")
+       public static DataFormatConverter getConverterForDataType(DataType 
originDataType, Context context) {
 
 Review comment:
   Can we pass a `TimeZone` instead of `Context` ? Will we add more parameters 
in the future? 
   To me, the way to construct a context is verbose.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to