This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 1db091ae334 branch-3.0: [fix](parquet)fix when hive_parquet_use_column_names=false && read partition tb cause be core. #49966 (#50007) 1db091ae334 is described below commit 1db091ae334c3c2bb4f0d4a18d72fbabcf90bfef Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Mon Apr 21 22:25:17 2025 -0700 branch-3.0: [fix](parquet)fix when hive_parquet_use_column_names=false && read partition tb cause be core. #49966 (#50007) Cherry-picked from #49966 Co-authored-by: daidai <changyu...@selectdb.com> --- be/src/vec/exec/format/parquet/vparquet_reader.cpp | 3 ++- .../hive/test_external_catalog_hive_partition.out | Bin 2711 -> 4455 bytes .../hive/test_external_catalog_hive_partition.groovy | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/be/src/vec/exec/format/parquet/vparquet_reader.cpp b/be/src/vec/exec/format/parquet/vparquet_reader.cpp index 1748138a577..ae978453f8a 100644 --- a/be/src/vec/exec/format/parquet/vparquet_reader.cpp +++ b/be/src/vec/exec/format/parquet/vparquet_reader.cpp @@ -558,6 +558,7 @@ Status ParquetReader::get_next_block(Block* block, size_t* read_rows, bool* eof) return Status::OK(); } + std::vector<std::string> original_block_column_name = block->get_names(); if (!_hive_use_column_names) { for (auto i = 0; i < block->get_names().size(); i++) { auto& col = block->get_by_position(i); @@ -581,7 +582,7 @@ Status ParquetReader::get_next_block(Block* block, size_t* read_rows, bool* eof) if (!_hive_use_column_names) { for (auto i = 0; i < block->columns(); i++) { - block->get_by_position(i).name = (*_column_names)[i]; + block->get_by_position(i).name = original_block_column_name[i]; } block->initialize_index_by_name(); } diff --git a/regression-test/data/external_table_p0/hive/test_external_catalog_hive_partition.out b/regression-test/data/external_table_p0/hive/test_external_catalog_hive_partition.out index aa1e48a439d..0402feef40e 100644 Binary files a/regression-test/data/external_table_p0/hive/test_external_catalog_hive_partition.out and b/regression-test/data/external_table_p0/hive/test_external_catalog_hive_partition.out differ diff --git a/regression-test/suites/external_table_p0/hive/test_external_catalog_hive_partition.groovy b/regression-test/suites/external_table_p0/hive/test_external_catalog_hive_partition.groovy index 32b80f5650d..d34467c4c56 100644 --- a/regression-test/suites/external_table_p0/hive/test_external_catalog_hive_partition.groovy +++ b/regression-test/suites/external_table_p0/hive/test_external_catalog_hive_partition.groovy @@ -65,9 +65,18 @@ suite("test_external_catalog_hive_partition", "p0,external,hive,external_docker, qt_q06 """ select * from multi_catalog.text_partitioned_columns where t_int is not null order by t_float """ } sql """ use `multi_catalog`; """ + sql """ set hive_parquet_use_column_names = true; """ + sql """ set hive_orc_use_column_names = true""" + q01_parquet() q01_orc() q01_text() + + sql """ set hive_parquet_use_column_names = false; """ + sql """ set hive_orc_use_column_names = false""" + q01_parquet() + q01_orc() + } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org