Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion be/src/vec/exec/format/parquet/vparquet_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,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);
Expand All @@ -584,7 +585,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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,99 @@
-- !q06 --
2023-01-03T00:00 100 0.3 test3

-- !q01 --
0.1 test1 2023-01-01T00:00 \N
0.2 test2 2023-01-02T00:00 \N
0.3 test3 2023-01-03T00:00 100

-- !q02 --
0.1 test1 2023-01-01T00:00 \N
0.2 test2 2023-01-02T00:00 \N

-- !q03 --
0.3 test3 2023-01-03T00:00 100

-- !q04 --
2023-01-01T00:00 \N 0.1 test1
2023-01-02T00:00 \N 0.2 test2
2023-01-03T00:00 100 0.3 test3

-- !q05 --
2023-01-01T00:00 \N 0.1 test1
2023-01-02T00:00 \N 0.2 test2

-- !q06 --
2023-01-03T00:00 100 0.3 test3

-- !q01 --
0.1 test1 2023-01-01T00:00 \N
0.2 test2 2023-01-02T00:00 \N
0.3 test3 2023-01-03T00:00 100

-- !q02 --
0.1 test1 2023-01-01T00:00 \N
0.2 test2 2023-01-02T00:00 \N

-- !q03 --
0.3 test3 2023-01-03T00:00 100

-- !q04 --
2023-01-01T00:00 \N 0.1 test1
2023-01-02T00:00 \N 0.2 test2
2023-01-03T00:00 100 0.3 test3

-- !q05 --
2023-01-01T00:00 \N 0.1 test1
2023-01-02T00:00 \N 0.2 test2

-- !q06 --
2023-01-03T00:00 100 0.3 test3

-- !q01 --
0.1 test1 2023-01-01T00:00 \N
0.2 test2 2023-01-02T00:00 \N
0.3 test3 2023-01-03T00:00 100

-- !q02 --
0.1 test1 2023-01-01T00:00 \N
0.2 test2 2023-01-02T00:00 \N

-- !q03 --
0.3 test3 2023-01-03T00:00 100

-- !q04 --
2023-01-01T00:00 \N 0.1 test1
2023-01-02T00:00 \N 0.2 test2
2023-01-03T00:00 100 0.3 test3

-- !q05 --
2023-01-01T00:00 \N 0.1 test1
2023-01-02T00:00 \N 0.2 test2

-- !q06 --
2023-01-03T00:00 100 0.3 test3

-- !q01 --
0.1 test1 2023-01-01T00:00 \N
0.2 test2 2023-01-02T00:00 \N
0.3 test3 2023-01-03T00:00 100

-- !q02 --
0.1 test1 2023-01-01T00:00 \N
0.2 test2 2023-01-02T00:00 \N

-- !q03 --
0.3 test3 2023-01-03T00:00 100

-- !q04 --
2023-01-01T00:00 \N 0.1 test1
2023-01-02T00:00 \N 0.2 test2
2023-01-03T00:00 100 0.3 test3

-- !q05 --
2023-01-01T00:00 \N 0.1 test1
2023-01-02T00:00 \N 0.2 test2

-- !q06 --
2023-01-03T00:00 100 0.3 test3

Original file line number Diff line number Diff line change
Expand Up @@ -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()

}
}

Loading