Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-12871 Implement front end using Calcite
  3. IMPALA-13568

Calcite planner is falling back incorrectly for some select statements

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Impala 4.5.0
    • None
    • Frontend
    • None
    • ghx-label-3

    Description

      The Calcite planner tries to parse with the Calcite parser. If that fails, it checks whether this is a select statement by parsing with the regular parser and seeing if it is a SelectStmt. If it isn't, it falls back to the original planner. This is great for DDL/DML and other random statements not supported by Calcite, but this check is not quite right. This statement is a select, but it falls back to the original planner:

      with t1 as (select int_col x, bigint_col y from alltypestiny),
      t2 as (select 1 x , 10 y), t3 as (values(2 x , 20 y), (3, 30))
      select * from t1 union all select * from t2 union all (select * from t3) order by x limit 20

      The check should be comparing against QueryStmt, which is the base class for SelectStmt as well as SetOperationsStmt and UnionStmt.

      Attachments

        Activity

          People

            Unassigned Unassigned
            joemcdonnell Joe McDonnell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: