From dd7ac8bb96b9eeaed8b9740609dc40ae57ef493b Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Mon, 28 Nov 2022 14:17:52 +0100 Subject: [PATCH 1/2] Update src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com> --- src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp b/src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp index 7e33e50adac..bcf362d1e0b 100644 --- a/src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp +++ b/src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp @@ -148,7 +148,7 @@ static std::optional convertToDynamicValue( { auto struct_builder = builder.as(); 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(data_type.get()); From 29407a22925652b46578460fb048c3f70adc7a9d Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Thu, 15 Dec 2022 21:32:28 +0100 Subject: [PATCH 2/2] Try fix tests --- tests/queries/0_stateless/02482_capnp_list_of_structs.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/queries/0_stateless/02482_capnp_list_of_structs.sh b/tests/queries/0_stateless/02482_capnp_list_of_structs.sh index 3a86c74311d..9d010fd85d5 100755 --- a/tests/queries/0_stateless/02482_capnp_list_of_structs.sh +++ b/tests/queries/0_stateless/02482_capnp_list_of_structs.sh @@ -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