Kyligence / ClickHouse

ClickHouse® is a free analytics DBMS for big data
https://clickhouse.com
Apache License 2.0
14 stars 17 forks source link

ARRAY JOIN requires array argument #412

Closed taiyang-li closed 1 year ago

taiyang-li commented 1 year ago
    select
    pkg_name,
    flow.slot_name as slot,
    if(upper(country) rlike '^[a-z]{2}$',upper(country),'unknown') as country,
    flow.load_type as load_type,
    flow.succ as succ
    from 
    bigo_ad.bigo_ad_callback_parquet_v1
    lateral view explode(from_json(event_info['flows'],'array<map<string,string>>'))t1 as flow
    where day = '2023-03-15' and hour = '03'
limit 10;
Caused by: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 4.0 failed 1 times, most recent failure: Lost task 0.0 in stage 4.0 (TID 4) (bigo executor driver): java.lang.RuntimeException: ARRAY JOIN requires array argument
0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x7f589e1dbe5a in ?
1. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x7f5897cf3c15 in ?
2. DB::Exception::Exception<char const (&) [35], void>(int, char const (&) [35]) @ 0x7f5890cb0816 in ?
3. DB::ActionsDAG::addArrayJoin(DB::ActionsDAG::Node const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x7f58995f61cb in ?
4. local_engine::SerializedPlanParser::parseArrayJoinWithDAG(substrait::Expression const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::shared_ptr<DB::ActionsDAG>, bool) @ 0x7f5890cebc87 in ?
5. local_engine::SerializedPlanParser::parseArrayJoin(DB::Block const&, substrait::Expression const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, std::__1::shared_ptr<DB::ActionsDAG>, bool) @ 0x7f5890cd75e3 in ?
6. local_engine::SerializedPlanParser::expressionsToActionsDAG(std::__1::vector<substrait::Expression, std::__1::allocator<substrait::Expression> > const&, DB::Block const&, DB::Block const&) @ 0x7f5890cd6129 in ?
7. local_engine::SerializedPlanParser::parseOp(substrait::Rel const&, std::__1::list<substrait::Rel const*, std::__1::allocator<substrait::Rel const*> >&) @ 0x7f5890ce491b in ?
8. local_engine::SerializedPlanParser::parseOp(substrait::Rel const&, std::__1::list<substrait::Rel const*, std::__1::allocator<substrait::Rel const*> >&) @ 0x7f5890ce4048 in ?
9. local_engine::SerializedPlanParser::parse(std::__1::unique_ptr<substrait::Plan, std::__1::default_delete<substrait::Plan> >) @ 0x7f5890ce293e in ?
10. local_engine::SerializedPlanParser::parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x7f5890cf239c in ?
11. Java_io_glutenproject_vectorized_ExpressionEvaluatorJniWrapper_nativeCreateKernelWithIterator @ 0x7f58910c12d6 in ?
taiyang-li commented 1 year ago

I'll fixed it .

taiyang-li commented 1 year ago

fixed.