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

Selecting option to limit results to 1000 on web UI causes parse error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.16.0
    • 1.16.0
    • Web Server

    Description

      Selecting option to Limit results to 1,000 causes a parse error on web UI, screen shot is attached. Browser used was Chrome.

      Drill version => 1.16.0-SNAPSHOT

      commit = e342ff5

      Error reported on web UI when we press Submit button on web UI

      Query Failed: An Error Occurred 
      org.apache.drill.common.exceptions.UserRemoteException: PARSE ERROR: 'LIMIT start, count' is not allowed under the current SQL conformance level SQL Query -- [autoLimit: 1,000 rows] select * from ( select length(varStr) from dfs.`/root/many_json_files` ) limit 1,000 [Error Id: e252d1cc-54d4-4530-837c-a1726a5be89f on qa102-45.qa.lab:31010]

       Stack trace from drillbit.log

      2019-02-27 21:59:18,428 [2388f7c9-2cb4-0ef8-4088-3ffcab1f0ed2:foreman] INFO o.a.drill.exec.work.foreman.Foreman - Query text for query with id 2388f7c9-2cb4-0ef8-4088-3ffcab1f0ed2 issued by anonymous: -- [autoLimit: 1,000 rows]
      select * from (
      select length(varStr) from dfs.`/root/many_json_files`
      ) limit 1,000
      2019-02-27 21:59:18,438 [2388f7c9-2cb4-0ef8-4088-3ffcab1f0ed2:foreman] INFO o.a.d.exec.planner.sql.SqlConverter - User Error Occurred: 'LIMIT start, count' is not allowed under the current SQL conformance level ('LIMIT start, count' is not allowed under the current SQL conformance level)
      org.apache.drill.common.exceptions.UserException: PARSE ERROR: 'LIMIT start, count' is not allowed under the current SQL conformance level
      
      SQL Query -- [autoLimit: 1,000 rows]
      select * from (
      select length(varStr) from dfs.`/root/many_json_files`
      ) limit 1,000
      
      [Error Id: 286b7236-bafd-4ddc-ab10-aaac07e5c088 ]
      at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:633) ~[drill-common-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.planner.sql.SqlConverter.parse(SqlConverter.java:193) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan(DrillSqlWorker.java:138) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.planner.sql.DrillSqlWorker.convertPlan(DrillSqlWorker.java:110) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:76) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:584) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:272) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_191]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_191]
      at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
      Caused by: org.apache.calcite.sql.parser.SqlParseException: 'LIMIT start, count' is not allowed under the current SQL conformance level
      at org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.convertException(DrillParserImpl.java:357) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.normalizeException(DrillParserImpl.java:145) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.calcite.sql.parser.SqlParser.parseQuery(SqlParser.java:156) ~[calcite-core-1.18.0-drill-r0.jar:1.18.0-drill-r0]
      at org.apache.calcite.sql.parser.SqlParser.parseStmt(SqlParser.java:181) ~[calcite-core-1.18.0-drill-r0.jar:1.18.0-drill-r0]
      at org.apache.drill.exec.planner.sql.SqlConverter.parse(SqlConverter.java:185) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      ... 8 common frames omitted
      Caused by: org.apache.drill.exec.planner.sql.parser.impl.ParseException: 'LIMIT start, count' is not allowed under the current SQL conformance level
      at org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.OrderedQueryOrExpr(DrillParserImpl.java:489) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SqlStmt(DrillParserImpl.java:873) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SqlStmtEof(DrillParserImpl.java:901) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.parseSqlStmtEof(DrillParserImpl.java:201) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.drill.exec.planner.sql.parser.impl.DrillParserWithCompoundIdConverter.parseSqlStmtEof(DrillParserWithCompoundIdConverter.java:59) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      at org.apache.calcite.sql.parser.SqlParser.parseQuery(SqlParser.java:148) ~[calcite-core-1.18.0-drill-r0.jar:1.18.0-drill-r0]
      ... 10 common frames omitted

       

      Attachments

        1. image-2019-02-27-14-17-24-348.png
          202 kB
          Khurram Faraaz

        Issue Links

          Activity

            People

              kkhatua Kunal Khatua
              khfaraaz Khurram Faraaz
              Sorabh Hamirwasia Sorabh Hamirwasia
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: