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

Support correlation variables in Project

    XMLWordPrintableJSON

Details

    Description

      The following queries fail:

      SELECT ARRAY(SELECT s.x) FROM (SELECT ARRAY[1,2,3] as x) s;
      SELECT ARRAY(SELECT * FROM UNNEST(s.x) y) FROM (SELECT ARRAY[1,2,3] as x) s;
      SELECT (SELECT CARDINALITY(s.x) LIMIT 1) FROM (SELECT ARRAY[1,2,3] as x) s;    
      

      With exception:

      Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.List
      

      You can find test cases for this task in https://github.com/apache/calcite/commit/27e68ded2c3bea7d7af73dd1dc156e46fb3591a8

      Attachments

        Issue Links

          Activity

            People

              libenchao Benchao Li
              dmsysolyatin Dmitry Sysolyatin
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 50m
                  3h 50m