Skip to content
Open
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
2 changes: 2 additions & 0 deletions src/Processors/Formats/Impl/Parquet/Decoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,8 @@ void IntConverter::convertField(std::span<const char> data, bool /*is_max*/, Fie
UInt64 val = 0;
switch (input_size)
{
case 1: val = unalignedLoad<UInt8>(data.data()); break;
case 2: val = unalignedLoad<UInt16>(data.data()); break;
case 4: val = unalignedLoad<UInt32>(data.data()); break;
case 8: val = unalignedLoad<UInt64>(data.data()); break;
default: chassert(false);
Expand Down
3 changes: 2 additions & 1 deletion src/Processors/Formats/Impl/Parquet/Decoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ struct PageDecoderInfo
};


/// Input physical type: INT32 or INT64.
/// Input physical type: BOOLEAN, INT32, or INT64.
/// input_size in {1, 4, 8}.
/// Output column type: [U]Int{8,16,32,64}.
/// Output Field type: [U]Int64, IPv4, or Decimal{32,64}.
struct IntConverter : public FixedSizeConverter
Expand Down
2 changes: 2 additions & 0 deletions src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,8 @@ void SchemaConverter::processPrimitiveColumn(
out_inferred_type = DataTypeFactory::instance().get("Bool");
auto converter = std::make_shared<IntConverter>();
converter->input_size = 1;
converter->input_signed = false;
converter->field_signed = false;
out_decoder.allow_stats = dispatch_int_stats_converter(/*allow_datetime_and_ipv4=*/ false, *converter);
out_decoder.fixed_size_converter = std::move(converter);
return;
Expand Down
1 change: 1 addition & 0 deletions tests/queries/0_stateless/03623_parquet_bool.reference
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true
4 changes: 4 additions & 0 deletions tests/queries/0_stateless/03623_parquet_bool.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Tags: no-parallel, no-fasttest

insert into function file('03626_parquet_bool.parquet') select true as x settings engine_file_truncate_on_insert=1;
select * from file('03626_parquet_bool.parquet') where x=1 settings input_format_parquet_use_native_reader_v3=1;
Loading