Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4682

IllegalStateException when ordering by aggregate function

    XMLWordPrintableJSON

Details

    Description

      The query is invalid (I believe) but we should produce a better error message:

      [localhost:21000] > select * from tpch.lineitem order by count(l_orderkey);
      Query: select * from tpch.lineitem order by count(l_orderkey)
      Query submitted at: 2016-12-16 07:35:53 (Coordinator: http://tarmstrong-box:25000)
      ERROR: AnalysisException: null
      CAUSED BY: IllegalStateException: null
      

      Backtrace is:

      I1216 07:35:58.021847  3438 jni-util.cc:169] org.apache.impala.common.AnalysisException
              at org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:424)
              at org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:363)
              at org.apache.impala.service.Frontend.analyzeStmt(Frontend.java:899)
              at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1039)
              at org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:160)
      Caused by: java.lang.IllegalStateException
              at com.google.common.base.Preconditions.checkState(Preconditions.java:129)
              at org.apache.impala.analysis.SelectStmt.analyzeAggregation(SelectStmt.java:728)
              at org.apache.impala.analysis.SelectStmt.analyze(SelectStmt.java:251)
              at org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:381)
              ... 4 more
      

      Attachments

        Activity

          People

            zoram Zoram Thanga
            tarmstrong Tim Armstrong
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: