mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 01:12:12 +00:00
Merge branch 'better-capn-proto' of github.com:Avogar/ClickHouse into better-capn-proto
This commit is contained in:
commit
291e51c533
@ -148,7 +148,7 @@ static std::optional<capnp::DynamicValue::Reader> convertToDynamicValue(
|
|||||||
{
|
{
|
||||||
auto struct_builder = builder.as<capnp::DynamicStruct>();
|
auto struct_builder = builder.as<capnp::DynamicStruct>();
|
||||||
auto nested_struct_schema = struct_builder.getSchema();
|
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())
|
if (data_type->isNullable())
|
||||||
{
|
{
|
||||||
const auto * nullable_type = assert_cast<const DataTypeNullable *>(data_type.get());
|
const auto * nullable_type = assert_cast<const DataTypeNullable *>(data_type.get());
|
||||||
|
@ -6,8 +6,7 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
. "$CURDIR"/../shell_config.sh
|
. "$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}')
|
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 $USER_FILES_PATH/data.capnp
|
||||||
touch $CAPN_PROTO_FILE
|
|
||||||
|
|
||||||
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)")
|
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
|
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), \`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'"
|
$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
|
||||||
|
Loading…
Reference in New Issue
Block a user