Merge branch 'better-capn-proto' of github.com:Avogar/ClickHouse into better-capn-proto

This commit is contained in:
avogar 2022-12-16 14:43:06 +00:00
commit 291e51c533
2 changed files with 4 additions and 5 deletions

View File

@ -148,7 +148,7 @@ static std::optional<capnp::DynamicValue::Reader> convertToDynamicValue(
{
auto struct_builder = builder.as<capnp::DynamicStruct>();
auto nested_struct_schema = struct_builder.getSchema();
/// Struct can be represent Tuple, Nullable (named union with two fields) or single column when it contains one nested column.
/// Struct can represent Tuple, Nullable (named union with two fields) or single column when it contains one nested column.
if (data_type->isNullable())
{
const auto * nullable_type = assert_cast<const DataTypeNullable *>(data_type.get());

View File

@ -6,8 +6,7 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../shell_config.sh
USER_FILES_PATH=$(clickhouse-client --query "select _path,_file from file('nonexist.txt', 'CSV', 'val1 char')" 2>&1 | grep Exception | awk '{gsub("/nonexist.txt","",$9); print $9}')
CAPN_PROTO_FILE=$USER_FILES_PATH/02482_data.capnp
touch $CAPN_PROTO_FILE
touch $USER_FILES_PATH/data.capnp
SCHEMADIR=$(clickhouse-client --query "select * from file('02482_data.capnp', 'CapnProto', 'val1 char') settings format_schema='nonexist:Message'" 2>&1 | grep Exception | grep -oP "file \K.*(?=/nonexist.capnp)")
CLIENT_SCHEMADIR=$CURDIR/format_schemas
@ -22,5 +21,5 @@ $CLICKHOUSE_CLIENT -q "select * from file(02482_data.capnp, auto, 'nested Nested
$CLICKHOUSE_CLIENT -q "select * from file(02482_data.capnp, auto, '\`nested.x\` Array(Int64), \`nested.y\` Array(Int64)') settings format_schema='$SERVER_SCHEMADIR/02482_list_of_structs.capnp:Nested'"
$CLICKHOUSE_CLIENT -q "select * from file(02482_data.capnp, auto, '\`nested.x\` Array(Int64)') settings format_schema='$SERVER_SCHEMADIR/02482_list_of_structs.capnp:Nested'"
rm $CAPN_PROTO_FILE
rm $USER_FILES_PATH/data.capnp
rm $USER_FILES_PATH/02482_data.capnp