Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-7137

Flink table API defaults top level fields as nullable and all nested fields within CompositeType as non-nullable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.4.0, 1.3.2
    • Component/s: Table API & SQL
    • Labels:
      None

      Description

      Right now FlinkTypeFactory does conversion between Flink TypeInformation to Calcite RelDataType by assuming the following:

      All top level fields will be set to nullable and all nested fields within CompositeRelDataType and GenericRelDataType will be set to Calcite default (which is non-nullable).

      This triggers Calcite SQL optimization engine drop all `IS NOT NULL` clause on nested fields, and would not be able to optimize when top level fields were actually non-nullable.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                walterddr Rong Rong
                Reporter:
                walterddr Rong Rong
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: