mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Fix style, output strings as binary instead of utf8
This commit is contained in:
parent
02e68655b4
commit
eb86721d14
@ -472,10 +472,12 @@ namespace DB
|
||||
int internal_fields_num = tuple_nested_types.size();
|
||||
/// If internal column has less elements then arrow struct, we will select only first internal_fields_num columns.
|
||||
if (internal_fields_num > struct_type->num_fields())
|
||||
throw Exception{
|
||||
"Cannot convert arrow STRUCT with " + std::to_string(struct_type->num_fields()) + " fields to a ClickHouse Tuple with "
|
||||
throw Exception
|
||||
{
|
||||
"Cannot convert arrow STRUCT with " + std::to_string(struct_type->num_fields()) + " fields to a ClickHouse Tuple with "
|
||||
+ std::to_string(internal_fields_num) + " elements " + column_type->getName(),
|
||||
ErrorCodes::CANNOT_CONVERT_TYPE};
|
||||
ErrorCodes::CANNOT_CONVERT_TYPE
|
||||
};
|
||||
|
||||
DataTypes nested_types;
|
||||
for (int i = 0; i < internal_fields_num; ++i)
|
||||
|
@ -52,9 +52,8 @@ namespace DB
|
||||
//{"DateTime", arrow::date64()}, // BUG! saves as date32
|
||||
{"DateTime", arrow::uint32()},
|
||||
|
||||
// TODO: ClickHouse can actually store non-utf8 strings!
|
||||
{"String", arrow::utf8()},
|
||||
{"FixedString", arrow::utf8()},
|
||||
{"String", arrow::binary()},
|
||||
{"FixedString", arrow::binary()},
|
||||
};
|
||||
|
||||
|
||||
@ -287,7 +286,7 @@ namespace DB
|
||||
size_t end)
|
||||
{
|
||||
const auto & internal_column = assert_cast<const ColumnType &>(*write_column);
|
||||
arrow::StringBuilder & builder = assert_cast<arrow::StringBuilder &>(*array_builder);
|
||||
arrow::BinaryBuilder & builder = assert_cast<arrow::BinaryBuilder &>(*array_builder);
|
||||
arrow::Status status;
|
||||
|
||||
for (size_t string_i = start; string_i < end; ++string_i)
|
||||
|
Loading…
Reference in New Issue
Block a user