sunjincheng121 commented on a change in pull request #8420: [FLINK-12408][python] Allow to define the data types in Python URL: https://github.com/apache/flink/pull/8420#discussion_r284531707
########## File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/Types.scala ########## @@ -196,4 +200,145 @@ object Types { def MULTISET[E](elementType: TypeInformation[E]): TypeInformation[util.Map[E, lang.Integer]] = { new MultisetTypeInfo(elementType) } + + def fromJson(json: String): TypeInformation[_] = { Review comment: Should we add this method? It's better to only use the py4j's ability for creating the Java Type. then we can get the benefits as follows: - Reduce the dependency of `table-planner module`, i.e. remove the dependency: org.json4s - We do not need to maintain a new method `fromJson` when adding a new type in Java. - Do not need to add `serializers` in python. Can we try these efforts? And please let me know what do you think? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services