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

Illegal state exception (or crash) in query with UNION in inline view

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • Impala 1.3
    • Impala 1.3.1
    • None
    • None

    Description

      I only tried this on the latest master, ed4cb660b7a60d9b9248df525c477bab4d218c4b

      The more complicated query at the bottom causes a crash. The query directly below causes an illegal state exception

      Query: select 1 FROM ( SELECT 1 col_1, 2 col_2 FROM functional.tinytable AS t1 UNION ALL SELECT 1, 2 FROM functional.tinytable AS t1) AS t1 WHERE col_2 >= col_1
      ERROR: IllegalStateException: null
      
      I0317 12:22:10.706429  1177 Planner.java:164] finalize plan fragments
      I0317 12:22:10.706573  1177 jni-util.cc:177] java.lang.IllegalStateException
              at com.google.common.base.Preconditions.checkState(Preconditions.java:129)
              at com.cloudera.impala.analysis.SlotRef.toThrift(SlotRef.java:118)
              at com.cloudera.impala.analysis.Expr.treeToThriftHelper(Expr.java:279)
              at com.cloudera.impala.analysis.Expr.treeToThriftHelper(Expr.java:282)
              at com.cloudera.impala.analysis.Expr.treeToThrift(Expr.java:264)
              at com.cloudera.impala.planner.PlanNode.treeToThriftHelper(PlanNode.java:369)
              at com.cloudera.impala.planner.PlanNode.treeToThrift(PlanNode.java:355)
              at com.cloudera.impala.planner.PlanFragment.toThrift(PlanFragment.java:209)
              at com.cloudera.impala.service.Frontend.createExecRequest(Frontend.java:602)
              at com.cloudera.impala.service.JniFrontend.createExecRequest(JniFrontend.java:115)
      I0317 12:22:10.732933  1177 status.cc:44] IllegalStateException: null
          @           0xd9d5ea  impala::Status::Status()
          @           0xfb52e2  impala::JniUtil::GetJniExceptionMsg()
          @           0xf1abde  impala::JniUtil::CallJniMethod<>()
          @           0xf17f79  impala::Frontend::GetExecRequest()
          @           0xe642d7  impala::ImpalaServer::ExecuteInternal()
          @           0xe63ea5  impala::ImpalaServer::Execute()
          @           0xeea149  impala::ImpalaServer::query()
          @          0x10dee66  beeswax::BeeswaxServiceProcessor::process_query()
          @          0x10deb9d  beeswax::BeeswaxServiceProcessor::dispatchCall()
          @          0x10c05bd  impala::ImpalaServiceProcessor::dispatchCall()
          @           0xe7247c  apache::thrift::TDispatchProcessor::process()
          @          0x1cf93bd  apache::thrift::server::TThreadPoolServer::Task::run()
          @          0x1ce5a7f  apache::thrift::concurrency::ThreadManager::Task::run()
          @          0x1ce84d9  apache::thrift::concurrency::ThreadManager::Worker::run()
          @           0xdd9e17  impala::ThriftThread::RunRunnable()
          @           0xddb47c  boost::_mfi::mf2<>::operator()()
          @           0xddb2e4  boost::_bi::list3<>::operator()<>()
          @           0xddb077  boost::_bi::bind_t<>::operator()()
          @           0xddaf9a  boost::detail::function::void_function_obj_invoker0<>::invoke()
          @           0xdfb42e  boost::function0<>::operator()()
          @           0xfc9cfc  impala::Thread::SuperviseThread()
          @           0xfd18e2  boost::_bi::list4<>::operator()<>()
          @           0xfd182b  boost::_bi::bind_t<>::operator()()
          @           0xfd17be  boost::detail::thread_data<>::run()
          @     0x7f3c9427cce9  (unknown)
          @     0x7f3c9405ae9a  start_thread
          @     0x7f3c91fa33fd  (unknown)
      

      crash:

      [localhost:21000] >  SELECT 1 FROM ( SELECT t1.tinyint_col AS tinyint_col_1, t1.smallint_col AS smallint_col_2 FROM functional.alltypes AS t1 UNION ALL SELECT CAST(smallint_col AS BIGINT), LENGTH(string_col) FROM functional.alltypes AS t1) AS t1 WHERE t1.smallint_col_2 >= t1.smallint_col_2 * t1.tinyint_col_1 ;
      Query: select 1 FROM ( SELECT t1.tinyint_col AS tinyint_col_1, t1.smallint_col AS smallint_col_2 FROM functional.alltypes AS t1 UNION ALL SELECT CAST(smallint_col AS BIGINT), LENGTH(string_col) FROM functional.alltypes AS t1) AS t1 WHERE t1.smallint_col_2 >= t1.smallint_col_2 * t1.tinyint_col_1
      Error communicating with impalad: TSocket read 0 bytes
      

      Attachments

        Activity

          People

            alex.behm Alexander Behm
            caseyc casey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: