Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-595

Can't project columns from a inner query that has "select *"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.5.0
    • SQL Parser
    • None

    Description

      Following queries don't work currently with schema-less tables such as parquet or json.

      with x as (select * from cp.`region.json`) select region_id, sales_city from x;
      select region_id, sales_city from ( select * from cp.`region.json`);
      

      Both fail with:

      message: "Failure while parsing sql. < ValidationException:[ org.eigenbase.util.EigenbaseContextException: From line 1, column 51 to line 1, column 59 ] < EigenbaseContextException:[ From line 1, column 51 to line 1, column 59 ] < SqlValidatorException:[ Column \'region_id\' not found in any table ]
      

      Attachments

        Issue Links

          Activity

            People

              DrillCommitter DrillCommitter
              vkorukanti Venki Korukanti
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: