lgbo-ustc opened a new issue, #5996: URL: https://github.com/apache/incubator-gluten/issues/5996
### Backend CH (ClickHouse) ### Bug description [Expected behavior] and [actual behavior]. Following query fails ```sql select t1.key, t1.attr from join_t1 as t1 left join join_t2 as t2 on t1.key = t2.key and t1.attr != t2.key and t1.a > t2.a; ``` throws an exception ``` Caused by: org.apache.gluten.exception.GlutenException: Not found column broadcast_right_key#5 in block: while executing 'INPUT : 2 -> broadcast_right_key#5 Nullable(String) : 2': While executing JoiningTransform 0. ../contrib/llvm-project/libcxx/include/exception:141: Poco::Exception::Exception(String const&, int) @ 0x0000000013740ed9 1. ./build1/../src/Common/Exception.cpp:101: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x0000000006426e19 2. ../contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000006230d4c 3. ../contrib/llvm-project/libcxx/include/vector:434: DB::Exception::Exception<String const&>(int, FormatStringHelperImpl<std::type_identity<String const&>::type>, String const&) @ 0x000000000634922b 4. ./build1/../src/Interpreters/ExpressionActions.cpp:0: DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool, bool) const @ 0x000000000ef35c17 5. ../contrib/llvm-project/libcxx/include/vector:537: DB::ExpressionActions::execute(DB::Block&, bool, bool) const @ 0x000000000ef3625f 6. ../contrib/llvm-project/libcxx/include/vector:1457: COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::(anonymous namespace)::buildAdditionalFilter<DB::(anonymous namespace)::AddedColumns<true>>(unsigned long, std::vector<DB::RowRef, std::allocator<DB::RowRef>> const&, std::vector<unsigned long, std::allocator<unsigned long>> const&, DB::(anonymous namespace)::AddedColumns<true>&) @ 0x000000000efe0594 ``` Becasue the `HashJoin` buillt at `StorageJoinFromReadBuffer` doesn't save right keys columns if we don't tell it. ### Spark version None ### Spark configurations _No response_ ### System information _No response_ ### Relevant logs _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
