Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2963

IndexOutOfBoundsException in RelStructuredTypeFlattener when accessing nested fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.19.0
    • 1.21.0
    • core
    • None

    Description

      When accessing nested field in a STRUCTURED SqlType, sometimes RelStructuredTypeFlattener will crash with java.lang.IndexOutOfBoundsException

      The test case is in SqlToRelConverterTest.java

      @Test
      public void testNestedColumnCrash()

      { final String sql = "select mailing_address.zip from sales.emp_address where home_address.city = 'abc'"; sql(sql).ok(); }

       

      The root cause is that when generate new RelNode for old RelNode, we did not consider whether the flattened field list needs null indicator. 

       

      Attachments

        Issue Links

          Activity

            People

              ihuzenko Igor Guzenko
              my7ym Will Yu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: