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

IllegalStateException when using grouping() or grouping_id() with no GROUP BY clause

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.0.0
    • Frontend
    • None
    • ghx-label-7

    Description

      https://issues.apache.org/jira/browse/IMPALA-10157#
      [localhost.EXAMPLE.COM:21000] default> select int_col, tinyint_col, grouping(int_col), grouping(tinyint_col), grouping_id(int_col, tinyint_col) from functional.alltypes;
      Query: select int_col, tinyint_col, grouping(int_col), grouping(tinyint_col), grouping_id(int_col, tinyint_col) from functional.alltypes
      Query submitted at: 2020-09-08 10:25:12 (Coordinator: http://tarmstrong-box2:25000)
      ERROR: IllegalStateException: null
      
      
      I0908 10:25:12.834306 19139 Frontend.java:1507] a845d2d57577cc5c:b905608c00000000] Analyzing query: select int_col, tinyint_col, grouping(int_col), grouping(tinyint_col), grouping_id(int_col, tinyint_col) from functional.alltypes db: default
      I0908 10:25:12.839713 19139 jni-util.cc:288] a845d2d57577cc5c:b905608c00000000] java.lang.IllegalStateException
              at com.google.common.base.Preconditions.checkState(Preconditions.java:492)
              at org.apache.impala.analysis.MultiAggregateInfo.analyze(MultiAggregateInfo.java:274)
              at org.apache.impala.analysis.SelectStmt$SelectAnalyzer.buildAggregateExprs(SelectStmt.java:845)
              at org.apache.impala.analysis.SelectStmt$SelectAnalyzer.analyze(SelectStmt.java:269)
              at org.apache.impala.analysis.SelectStmt$SelectAnalyzer.access$100(SelectStmt.java:237)
              at org.apache.impala.analysis.SelectStmt.analyze(SelectStmt.java:230)
              at org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:472)
              at org.apache.impala.analysis.AnalysisContext.analyzeAndAuthorize(AnalysisContext.java:436)
              at org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:1547)
              at org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:1514)
              at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1484)
              at org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:162)
      I0908 10:25:12.839778 19139 status.cc:129] a845d2d57577cc5c:b905608c00000000] IllegalStateException: null
          @          0x1ce443b  impala::Status::Status()
          @          0x2644a01  impala::JniUtil::GetJniExceptionMsg()
          @          0x2446c96  impala::JniCall::Call<>()
          @          0x2443e49  impala::JniUtil::CallJniMethod<>()
          @          0x2442150  impala::Frontend::GetExecRequest()
          @          0x2cc4d47  impala::QueryDriver::RunFrontendPlanner()
          @          0x246f844  impala::ImpalaServer::ExecuteInternal()
          @          0x246f202  impala::ImpalaServer::Execute()
          @          0x25098c6  impala::ImpalaServer::query()
          @          0x2afb7df  beeswax::BeeswaxServiceProcessor::process_query()
          @          0x2afb52d  beeswax::BeeswaxServiceProcessor::dispatchCall()
          @          0x2ac8976  impala::ImpalaServiceProcessor::dispatchCall()
          @          0x1c92db3  apache::thrift::TDispatchProcessor::process()
          @          0x2195f36  apache::thrift::server::TAcceptQueueServer::Task::run()
          @          0x218b436  impala::ThriftThread::RunRunnable()
          @          0x218ca72  boost::_mfi::mf2<>::operator()()
          @          0x218c906  boost::_bi::list3<>::operator()<>()
          @          0x218c64c  boost::_bi::bind_t<>::operator()()
          @          0x218c55e  boost::detail::function::void_function_obj_invoker0<>::invoke()
          @          0x2107043  boost::function0<>::operator()()
          @          0x26d5ea5  impala::Thread::SuperviseThread()
          @          0x26dde42  boost::_bi::list5<>::operator()<>()
          @          0x26ddd66  boost::_bi::bind_t<>::operator()()
          @          0x26ddd27  boost::detail::thread_data<>::run()
          @          0x3ec7271  thread_proxy
          @     0x7fa5b50b76da  start_thread
          @     0x7fa5b1aaea3e  clone
      
      

      Attachments

        Issue Links

          Activity

            People

              tarmstrong Tim Armstrong
              tarmstrong Tim Armstrong
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: