From 6f5bf4b6c5bc027b77a001710cd45db002aa0aff Mon Sep 17 00:00:00 2001 From: fantasy12345zsq <1575033031@qq.com> Date: Mon, 4 Nov 2024 11:03:03 +0800 Subject: [PATCH] [fix](orc) fix predicate filter failed when use hive 1.x version --- be/src/vec/exec/format/orc/vorc_reader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/be/src/vec/exec/format/orc/vorc_reader.cpp b/be/src/vec/exec/format/orc/vorc_reader.cpp index 6b6639f2feb2446..0d896d6a65185f9 100644 --- a/be/src/vec/exec/format/orc/vorc_reader.cpp +++ b/be/src/vec/exec/format/orc/vorc_reader.cpp @@ -734,6 +734,12 @@ bool OrcReader::_init_search_argument( if (predicates.empty()) { return false; } + + if (_is_hive1_orc_or_use_idx) { + for (OrcPredicate & it : predicates) + it.col_name = _col_name_to_file_col_name[it.col_name]; + } + std::unique_ptr builder = orc::SearchArgumentFactory::newBuilder(); if (build_search_argument(predicates, 0, builder)) { std::unique_ptr sargs = builder->build();