Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
ghx-label-4
Description
This is reported from a community user. When using the DEBUG build, impalad could hit DCHECK and crash when running union with empty table with MT_DOP>1.
I can reproduce the issue by launching the impala cluster with only one node:
bin/start-impala-cluster.py -r -s 1
Then run the following queries
create table empty_tbl (id int) stored as parquet; create table tbl (id int) stored as parquet; insert into tbl values (0), (1), (2); insert into tbl values (3); set mt_dop=2; select count(*) from (select * from empty_tbl union all select * from tbl) t;
The stacktrace in impalad.ERROR:
F1216 14:51:44.285214 24142 hdfs-scan-node-base.cc:352] b444e7823f021f02:5af2aa4700000000] Check failed: shared_state_.use_mt_scan_node_ || instance_ctx_pbs.size() == 1 Non MT scan node should only have a single instance.
*** Check failure stack trace: ***
@ 0x379c53d google::LogMessage::Fail()
@ 0x379e474 google::LogMessage::SendToLog()
@ 0x379bf1c google::LogMessage::Flush()
@ 0x379e999 google::LogMessageFatal::~LogMessageFatal()
@ 0x197ddfd impala::HdfsScanPlanNode::ProcessScanRangesAndInitSharedState()
@ 0x197ef4f impala::HdfsScanPlanNode::Init()
@ 0x1961150 _ZN6impala8PlanNode16CreateTreeHelperEPNS_13FragmentStateERKSt6vectorINS_9TPlanNodeESaIS4_EEPS0_PiPS9_.localalias
@ 0x1961082 _ZN6impala8PlanNode16CreateTreeHelperEPNS_13FragmentStateERKSt6vectorINS_9TPlanNodeESaIS4_EEPS0_PiPS9_.localalias
@ 0x1961082 _ZN6impala8PlanNode16CreateTreeHelperEPNS_13FragmentStateERKSt6vectorINS_9TPlanNodeESaIS4_EEPS0_PiPS9_.localalias
@ 0x1961205 impala::PlanNode::CreateTree()
@ 0x13c56c2 impala::FragmentState::Init()
@ 0x13c76b9 impala::FragmentState::CreateFragmentStateMap()
@ 0x134492e impala::QueryState::StartFInstances()
@ 0x1335036 impala::QueryExecMgr::ExecuteQueryHelper()
@ 0x1336100 boost::detail::function::void_function_obj_invoker0<>::invoke()
@ 0x18c7018 impala::Thread::SuperviseThread()
@ 0x18c7e21 boost::detail::thread_data<>::run()
@ 0x239bb77 thread_proxy
@ 0x7effc4fcf6db start_thread
@ 0x7effc1d6f61f clone