diff --git a/src/Processors/Formats/Impl/Parquet/ParquetDataValuesReader.cpp b/src/Processors/Formats/Impl/Parquet/ParquetDataValuesReader.cpp index 758627f833d..6ccbde8eabb 100644 --- a/src/Processors/Formats/Impl/Parquet/ParquetDataValuesReader.cpp +++ b/src/Processors/Formats/Impl/Parquet/ParquetDataValuesReader.cpp @@ -365,11 +365,11 @@ void ParquetPlainValuesReader::readBatch( null_map, /* individual_visitor */ [&](size_t nest_cursor) { - plain_data_buffer.readValue(column_data[nest_cursor]); + plain_data_buffer.readValuesOfDifferentSize(column_data + nest_cursor, 1); }, /* repeated_visitor */ [&](size_t nest_cursor, UInt32 count) { - plain_data_buffer.readBytes(column_data + nest_cursor, count * sizeof(TValue)); + plain_data_buffer.readValuesOfDifferentSize(column_data + nest_cursor, count); } ); } diff --git a/tests/queries/0_stateless/03262_test_parquet_native_reader_int_logical_type.reference b/tests/queries/0_stateless/03262_test_parquet_native_reader_int_logical_type.reference index e69de29bb2d..73ed2f206f8 100644 --- a/tests/queries/0_stateless/03262_test_parquet_native_reader_int_logical_type.reference +++ b/tests/queries/0_stateless/03262_test_parquet_native_reader_int_logical_type.reference @@ -0,0 +1,40 @@ +-94 53304 17815465730223871 +57 15888 33652524900575246 +-4 14877 53832092832965652 +33 3387 86326601511136103 +104 3383 115438187156564782 +-11 37403 145056169255259589 +-72 46473 159324626361233509 +103 35510 173644182696185097 +-26 60902 185175917734318892 +70 48767 193167023342307884 +2 21648 247953090704786001 +20 2986 268127160817221407 +76 20277 290178827409195337 +61 28692 305149163504092270 +-74 65427 326871531363668398 +-15 20256 351812901947846888 +-39 65472 357371822264135234 +79 38671 371605113770958364 +-29 41706 394460710549666968 +92 25026 412913269933311543 +-94 53304 17815465730223871 +57 15888 33652524900575246 +-4 14877 53832092832965652 +33 3387 86326601511136103 +104 3383 115438187156564782 +-11 37403 145056169255259589 +-72 46473 159324626361233509 +103 35510 173644182696185097 +-26 60902 185175917734318892 +70 48767 193167023342307884 +2 21648 247953090704786001 +20 2986 268127160817221407 +76 20277 290178827409195337 +61 28692 305149163504092270 +-74 65427 326871531363668398 +-15 20256 351812901947846888 +-39 65472 357371822264135234 +79 38671 371605113770958364 +-29 41706 394460710549666968 +92 25026 412913269933311543 diff --git a/tests/queries/0_stateless/03262_test_parquet_native_reader_int_logical_type.sh b/tests/queries/0_stateless/03262_test_parquet_native_reader_int_logical_type.sh old mode 100644 new mode 100755 index dc47b61d7aa..7d05171516f --- a/tests/queries/0_stateless/03262_test_parquet_native_reader_int_logical_type.sh +++ b/tests/queries/0_stateless/03262_test_parquet_native_reader_int_logical_type.sh @@ -18,4 +18,5 @@ DATA_FILE_USER_PATH="${WORKING_DIR}/multi_column_bf.gz.parquet" cp ${DATA_FILE} ${DATA_FILE_USER_PATH} -${CLICKHOUSE_CLIENT} --query="select int8_logical, uint16_logical, uint64_logical from file('${DATA_FILE_USER_PATH}', Parquet) order by uint64_logical limit 10"; +${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;"; +${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;";