Skip to content

Commit 60b4d32

Browse files
committed
Fix logical error in Arrow format with LowCardinality(FixedString)
1 parent 1f93c8a commit 60b4d32

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/Processors/Formats/Impl/CHColumnToArrowColumn.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
M(FLOAT, arrow::FloatType) \
5353
M(DOUBLE, arrow::DoubleType) \
5454
M(BINARY, arrow::BinaryType) \
55-
M(STRING, arrow::StringType)
55+
M(STRING, arrow::StringType) \
56+
M(FIXED_SIZE_BINARY, arrow::FixedSizeBinaryType)
5657

5758
namespace DB
5859
{
@@ -512,7 +513,7 @@ namespace DB
512513
FOR_ARROW_TYPES(DISPATCH)
513514
#undef DISPATCH
514515

515-
throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot fill arrow array with {} data.", column_type->getName());
516+
throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot fill arrow array {} with {} data", value_type->name(), column_type->getName());
516517
}
517518

518519
template <typename ColumnType, typename ArrowBuilder>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
c1 LowCardinality(Nullable(FixedString(1)))
2+
a
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
4+
# shellcheck source=../shell_config.sh
5+
. "$CURDIR"/../shell_config.sh
6+
7+
$CLICKHOUSE_LOCAL --output_format_arrow_low_cardinality_as_dictionary=1 "select 'a'::LowCardinality(FixedString(1)) as c1 format Arrow" | $CLICKHOUSE_LOCAL --input-format=Arrow --table=test -q "desc test; select * from test"
8+

0 commit comments

Comments
 (0)