LadyForest opened a new pull request, #21452:
URL: https://github.com/apache/flink/pull/21452

   ## What is the purpose of the change
   
   This pull request fixes the issue that Flink SQL's logical type `Row` lost 
the inner field's nullability after converting to `RelDataType`. E.g. `a Row<f0 
INT NOT NULL, f1 STRING>` is converted to `a Row<f0 INT, f1 STRING>`
   
   
   ## Brief change log
   -  Let`ExtendedSqlRowTypeNameSpec` pass the inner field's nullability when 
deriving type.
   - Specify the `StructKind.PEEK_FIELDS_NO_EXPAND` to create a struct type. 
This is required because in `FlinkTypeFactory#createTypeWithNullability`, only 
`PEEK_FIELDS_NO_EXPAND` preserves the inner field's nullability.
   
   
   ## Verifying this change
   
   This change is already covered by existing tests 
`SqlToOperationConverterTest#testCreateTableWithFullDataTypes`. The nullability 
check has been tweaked. However, the issue that the precision of the `TIME` and 
`Row` type's inner comment loss still exists, so the `TODO` is not removed. 
Beyond this, the `table.q` file also covers the change check.
   
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduces a new feature? no
     - If yes, how is the feature documented? not applicable
   


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