kurnoolsaketh commented on code in PR #29493:
URL: https://github.com/apache/flink/pull/29493#discussion_r4329860656


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/JsonGenerateUtils.scala:
##########
@@ -92,6 +92,18 @@ object JsonGenerateUtils {
           case TIMESTAMP_WITH_LOCAL_TIME_ZONE => 
s"""$nodeFactoryTerm.textNode($isoTerm + "Z")"""
         }
 
+      case TIME_WITHOUT_TIME_ZONE =>
+        val formatter = 
s"${typeTerm(classOf[DateTimeFormatter])}.ISO_LOCAL_TIME"
+        val isoTerm =
+          
s"${typeTerm(classOf[DateTimeUtils])}.toLocalTime($valueTerm).format($formatter)"
+        s"$nodeFactoryTerm.textNode($isoTerm)"
+
+      case DATE =>
+        val formatter = s"${typeTerm(classOf[DateTimeFormatter])}.ISO_DATE"

Review Comment:
   it's a good catch, thank you. `DATE` logical type should be formatted using 
`ISO_LOCAL_DATE` since it doesn't contain a time-zone ID/offset. I've changed 
it.



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