danny0405 commented on a change in pull request #11568: [FLINK-16779][table]
Add RAW type support in DDL and functions
URL: https://github.com/apache/flink/pull/11568#discussion_r405221893
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkTypeFactory.scala
##########
@@ -484,6 +493,9 @@ object FlinkTypeFactory {
// CURSOR for UDTF case, whose type info will never be used, just a
placeholder
case CURSOR => new TypeInformationRawType[Nothing](new NothingTypeInfo)
+ case null if relDataType.isInstanceOf[RawRelDataType] =>
Review comment:
If a type can be used in all kinds of SQL contexts directly, it is a SQL
type, so the `RawRelDataType` should extend `AbstractSqlType` instead, as for
the type name.
I'm not sure if a `RAW` type can has precision, either `SqlTypeName.ANY` or
`SqlTypeName.OTHER` is fine for me, the precision constraint for type name is
mainly used for sanity check when creating type instances in
`RelDataTypeFactory`, Flink has it's own logic for creating this type, so this
is not a problem.
----------------------------------------------------------------
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