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

leastRestrictive in FlinkTypeFactory does not resolve composite type correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.3.4, 1.4.0, 1.5.0
    • Table SQL / API
    • None

    Description

      FlinkTypeFactory does not override the following function correctly:

      def leastRestrictive(types: util.List[RelDataType]): RelDataType = {
        //... 
      }
      

      dealing with SQL such as:

      CASE 
        WHEN <CONDITION> THEN 
          <COMPOSITE_TYPE> 
        ELSE 
          NULL 
      END
      

      will trigger runtime exception.

      See following test sample for more details:
      https://github.com/walterddr/flink/commit/a5f2affc9bbbd50f06200f099c90597e519e9170

      Attachments

        Issue Links

          Activity

            People

              rongr Rong Rong
              rongr Rong Rong
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: