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

Calcite errors on columns starting with a digit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Workaround
    • None
    • None
    • None
    • None
    • Calcite 1.30.0 on Java 11. Ran the example PySpark using Python 3.9 with Spark 3.1.2

    Description

      Not sure if this is related solely to Spark:

       

      Parsing the following query errors in Calcite:

      public static void main(String[] args) throws SqlParseException {
          String sqlQuery = "SELECT a AS 1a FROM FakeTable";
          SqlParser.create(sqlQuery, SparkSqlDialect.DEFAULT.configureParser(SqlParser.config())).parseQuery();
      } 
      Exception in thread "main" org.apache.calcite.sql.parser.SqlParseException: Encountered "1" at line 1, column 13.
      

      However, Spark does accept such queries:

      Attachments

        1. image-2022-04-28-09-41-03-535.png
          22 kB
          Laurens Versluis

        Activity

          People

            Unassigned Unassigned
            lfdversluis Laurens Versluis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: