Skip to content

Commit afae6d2

Browse files
committed
minor adjustment and tests
1 parent 06a231c commit afae6d2

File tree

3 files changed

+44
-3
lines changed

3 files changed

+44
-3
lines changed

src/Processors/Formats/Impl/Parquet/ParquetDataValuesReader.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,11 @@ void ParquetPlainValuesReader<TColumn, ParquetType>::readBatch(
365365
null_map,
366366
/* individual_visitor */ [&](size_t nest_cursor)
367367
{
368-
plain_data_buffer.readValue(column_data[nest_cursor]);
368+
plain_data_buffer.readValuesOfDifferentSize<TValue, ParquetType>(column_data + nest_cursor, 1);
369369
},
370370
/* repeated_visitor */ [&](size_t nest_cursor, UInt32 count)
371371
{
372-
plain_data_buffer.readBytes(column_data + nest_cursor, count * sizeof(TValue));
372+
plain_data_buffer.readValuesOfDifferentSize<TValue, ParquetType>(column_data + nest_cursor, count);
373373
}
374374
);
375375
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
-94 53304 17815465730223871
2+
57 15888 33652524900575246
3+
-4 14877 53832092832965652
4+
33 3387 86326601511136103
5+
104 3383 115438187156564782
6+
-11 37403 145056169255259589
7+
-72 46473 159324626361233509
8+
103 35510 173644182696185097
9+
-26 60902 185175917734318892
10+
70 48767 193167023342307884
11+
2 21648 247953090704786001
12+
20 2986 268127160817221407
13+
76 20277 290178827409195337
14+
61 28692 305149163504092270
15+
-74 65427 326871531363668398
16+
-15 20256 351812901947846888
17+
-39 65472 357371822264135234
18+
79 38671 371605113770958364
19+
-29 41706 394460710549666968
20+
92 25026 412913269933311543
21+
-94 53304 17815465730223871
22+
57 15888 33652524900575246
23+
-4 14877 53832092832965652
24+
33 3387 86326601511136103
25+
104 3383 115438187156564782
26+
-11 37403 145056169255259589
27+
-72 46473 159324626361233509
28+
103 35510 173644182696185097
29+
-26 60902 185175917734318892
30+
70 48767 193167023342307884
31+
2 21648 247953090704786001
32+
20 2986 268127160817221407
33+
76 20277 290178827409195337
34+
61 28692 305149163504092270
35+
-74 65427 326871531363668398
36+
-15 20256 351812901947846888
37+
-39 65472 357371822264135234
38+
79 38671 371605113770958364
39+
-29 41706 394460710549666968
40+
92 25026 412913269933311543

tests/queries/0_stateless/03262_test_parquet_native_reader_int_logical_type.sh

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ DATA_FILE_USER_PATH="${WORKING_DIR}/multi_column_bf.gz.parquet"
1818

1919
cp ${DATA_FILE} ${DATA_FILE_USER_PATH}
2020

21-
${CLICKHOUSE_CLIENT} --query="select int8_logical, uint16_logical, uint64_logical from file('${DATA_FILE_USER_PATH}', Parquet) order by uint64_logical limit 10";
21+
${CLICKHOUSE_CLIENT} --query="select int8_logical, uint16_logical, uint64_logical from file('${DATA_FILE_USER_PATH}', Parquet) order by uint64_logical limit 20 SETTINGS input_format_parquet_use_native_reader=false;";
22+
${CLICKHOUSE_CLIENT} --query="select int8_logical, uint16_logical, uint64_logical from file('${DATA_FILE_USER_PATH}', Parquet) order by uint64_logical limit 20 SETTINGS input_format_parquet_use_native_reader=true;";

0 commit comments

Comments
 (0)