calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Feng Zhu (JIRA)" <>
Subject [jira] [Created] (CALCITE-3077) Rewrite CUBE&ROLLUP&CUBE queries in SparkSqlDialect
Date Sat, 18 May 2019 03:16:02 GMT
Feng Zhu created CALCITE-3077:

             Summary: Rewrite CUBE&ROLLUP&CUBE queries in SparkSqlDialect
                 Key: CALCITE-3077
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.20.0
            Reporter: Feng Zhu

*Backgroung:* we are building a platform that adopts Calcite to process (i.e., parse&validate&convert&optimize)
SQL queries and then regenerate the final SQL. For the purpose of handling large volume data,
we use the popular SparkSQL engine to execute the generated SQL query.

However, we found a great part of real-world test cases failed, due to syntax differences
*_CUBE/ROLLUP/GROUPING SETS_* clauses.  Spark SQL dialect supports only "WITH ROLLUP&CUBE"
in the "GROUP BY" clause. The corresponding grammer [1] is defined as below.

    : GROUP BY groupingExpressions+=expression (',' groupingExpressions+=expression)* (
      WITH kind=ROLLUP
    | WITH kind=CUBE
    | kind=GROUPING SETS '(' groupingSet (',' groupingSet)* ')')?
    | GROUP BY kind=GROUPING SETS '(' groupingSet (',' groupingSet)* ')'


This message was sent by Atlassian JIRA

View raw message