art4ul commented on a change in pull request #8179: [FLINK-12200] [Table API]
Support UNNEST for MAP types
URL: https://github.com/apache/flink/pull/8179#discussion_r277435848
##########
File path:
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/rules/logical/LogicalUnnestRule.scala
##########
@@ -94,6 +95,17 @@ class LogicalUnnestRule(
case arrayType: ArrayRelDataType =>
(arrayType.getComponentType,
ExplodeFunctionUtil.explodeTableFuncFromType(arrayType.typeInfo))
+
+ case map: MapRelDataType =>
+ val keyTypeInfo = FlinkTypeFactory.toTypeInfo(map.keyType)
+ val valueTypeInfo = FlinkTypeFactory.toTypeInfo(map.valueType)
+ val componentTypeInfo =
createTuple2TypeInformation(keyTypeInfo,valueTypeInfo)
+ val componentType =
cluster.getTypeFactory.asInstanceOf[FlinkTypeFactory]
+ .createTypeFromTypeInfo(componentTypeInfo,true)
Review comment:
fixed
----------------------------------------------------------------
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