From ba1dcdb34dea20cad32a57da7f8be2c8b5ae125f 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 | 5 +++++ 1 file changed, 5 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..75e25c505d9ca07 100644 --- a/be/src/vec/exec/format/orc/vorc_reader.cpp +++ b/be/src/vec/exec/format/orc/vorc_reader.cpp @@ -734,6 +734,11 @@ 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();