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

parse errors with ~

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      for example:

      select "product_class"."product_family" as "c0", "product_class"."product_department" as "c1", "product_class"."product_category" as "c2" from "product" as "product", "product_class" as "product_class", "sales_fact_1997" as "sales_fact_1997", "time_by_day" as "time_by_day" where "product"."product_class_id" = "product_class"."product_class_id" and "sales_fact_1997"."product_id" = "product"."product_id" and "sales_fact_1997"."time_id" = "time_by_day"."time_id" and "time_by_day"."the_year" = 1997 group by "product_class"."product_family", "product_class"."product_department", "product_class"."product_category" having cast("product_class"."product_category" as text) ~ '(?i).a"); window.alert("woot'');.' order by "product_class"."product_family" ASC NULLS LAST, "product_class"."product_department" ASC NULLS LAST, "product_class"."product_category" ASC NULLS LAST

      java.lang.RuntimeException: parse failed
      at net.hydromatic.optiq.prepare.OptiqPrepareImpl.prepare_(OptiqPrepareImpl.java:147)
      at net.hydromatic.optiq.prepare.OptiqPrepareImpl.prepareSql(OptiqPrepareImpl.java:110)
      at net.hydromatic.optiq.jdbc.OptiqStatement.parseQuery(OptiqStatement.java:372)
      at net.hydromatic.optiq.jdbc.OptiqStatement.executeQuery(OptiqStatement.java:75)
      at cascading.lingual.jdbc.JDBCPlatformTestCase.executeSql(JDBCPlatformTestCase.java:139)
      at cascading.lingual.jdbc.JDBCPlatformTestCase.assertTablesEqual(JDBCPlatformTestCase.java:157)
      at lingual.comprehensive.ComprehensiveSuiteBase.runTest(ComprehensiveSuiteBase.java:233)
      at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
      at cascading.platform.PlatformRunner.runChild(PlatformRunner.java:261)
      at cascading.platform.PlatformRunner.runChild(PlatformRunner.java:56)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: org.eigenbase.sql.parser.SqlParseException: Lexical error at line 1, column 673. Encountered: "~" (126), after : ""
      at org.eigenbase.sql.parser.impl.SqlParserImpl.convertException(SqlParserImpl.java:280)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.normalizeException(SqlParserImpl.java:44)
      at org.eigenbase.sql.parser.SqlParser.parseStmt(SqlParser.java:138)
      at net.hydromatic.optiq.prepare.OptiqPrepareImpl.prepare_(OptiqPrepareImpl.java:145)
      ... 31 more
      Caused by: org.eigenbase.sql.parser.impl.TokenMgrError: Lexical error at line 1, column 673. Encountered: "~" (126), after : ""
      at org.eigenbase.sql.parser.impl.SqlParserImplTokenManager.getNextToken(SqlParserImplTokenManager.java:4919)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.jj_scan_token(SqlParserImpl.java:14945)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.jj_3_125(SqlParserImpl.java:11696)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.jj_3_141(SqlParserImpl.java:11735)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.jj_3_146(SqlParserImpl.java:11755)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.jj_3_147(SqlParserImpl.java:11773)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.jj_2_147(SqlParserImpl.java:5687)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.Expression2(SqlParserImpl.java:2048)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.Expression(SqlParserImpl.java:2018)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.HavingOpt(SqlParserImpl.java:1684)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.SqlSelect(SqlParserImpl.java:638)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.LeafQuery(SqlParserImpl.java:399)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.LeafQueryOrExpr(SqlParserImpl.java:2003)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.QueryOrExpr(SqlParserImpl.java:1965)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.OrderedQueryOrExpr(SqlParserImpl.java:377)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.SqlStmt(SqlParserImpl.java:573)
      at org.eigenbase.sql.parser.impl.SqlParserImpl.SqlStmtEof(SqlParserImpl.java:599)
      at org.eigenbase.sql.parser.SqlParser.parseStmt(SqlParser.java:130)
      ... 32 more

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/issues/22
      Created by: jatir
      Labels:
      Created at: Fri Feb 15 23:24:40 CET 2013
      State: closed

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              github-import GitHub Import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: