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

Flink Table ApI not working with nested Json schema starting From 1.6.x

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.6.4, 1.7.2, 1.8.1
    • None
    • Table SQL / API

    Description

      starting from Flink 1.6.2 , some schema not working when have nested object .

      issue like :  Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Column 'data.interaction.action_type' not found in table 

      Even we can see that column from Table Schema .

      And the same schema and query working on 1.5.2 , but not working for 1.6.x , 1.7.x and 1.8.x

       

      I tried to dive into the bug, and found the root cause is calcite library doesn't mapping the column name with the correct Row type . 

      I checked Flink 1.6 using the same version of Calcite as Flink 1.5 .  Not sure if Calcite is the root cause of this issue .

      Attached with the code sample and two issue json schemas . both examples give column not found exception .

       

      Attachments

        1. jsonSchema.json
          1 kB
          Yu Du
        2. jsonSchema2.json
          1 kB
          Yu Du
        3. FlinkTableBugCode
          2 kB
          Yu Du
        4. schema_mapping_error_screenshot .png
          175 kB
          Yu Du

        Activity

          People

            Unassigned Unassigned
            jacky.du0314@gmail.com Yu Du
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: