godfreyhe commented on a change in pull request #11260: 
[FLINK-16344][table-planner-blink] Preserve nullability for nested types
URL: https://github.com/apache/flink/pull/11260#discussion_r390072796
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkTypeFactory.scala
 ##########
 @@ -293,6 +293,11 @@ class FlinkTypeFactory(typeSystem: RelDataTypeSystem) 
extends JavaTypeFactoryImp
       case it: TimeIndicatorRelDataType =>
         new TimeIndicatorRelDataType(it.typeSystem, it.originalType, 
isNullable, it.isEventTime)
 
+      // for nested rows we keep the nullability property,
+      // top-level rows fall back to Calcite's default handling
+      case rt: RelRecordType if rt.getStructKind == 
StructKind.PEEK_FIELDS_NO_EXPAND =>
 
 Review comment:
   Make sense to me. I also notice `outer joins`  is mentioned in 
`RelDataTypeFactoryImpl#copyRecordType`'s  comment

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