ClickHouse/tests/queries/0_stateless/02403_arrow_large_string.sh
Yakov Olkhovskiy 216a6ce8a4 test is added
2022-08-17 07:52:34 +00:00

29 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Tags: no-fasttest
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
# ## generate arrow file with python
# import pyarrow as pa
# schema = pa.schema([ pa.field('a', pa.large_utf8()) ])
# a = pa.array(["00000", "00001", "00002"])
# with pa.OSFile('arraydata.arrow', 'wb') as sink:
# with pa.ipc.new_file(sink, schema=schema) as writer:
# batch = pa.record_batch([a], schema=schema)
# writer.write(batch)
# cat arraydata.arrow | base64
cat <<EOF | base64 --decode | $CLICKHOUSE_LOCAL --query='SELECT * FROM table FORMAT TSVWithNamesAndTypes' --input-format=Arrow
QVJST1cxAAD/////cAAAABAAAAAAAAoADAAGAAUACAAKAAAAAAEEAAwAAAAIAAgAAAAEAAgAAAAE
AAAAAQAAABQAAAAQABQACAAGAAcADAAAABAAEAAAAAAAARQQAAAAGAAAAAQAAAAAAAAAAQAAAGEA
AAAEAAQABAAAAAAAAAD/////mAAAABQAAAAAAAAADAAWAAYABQAIAAwADAAAAAADBAAYAAAAMAAA
AAAAAAAAAAoAGAAMAAQACAAKAAAATAAAABAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAAA8AAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAFAAAAAAAAAAoAAAAAAAAADwAAAAAAAAAwMDAwMDAwMDAxMDAwMDIA/////wAA
AAAQAAAADAAUAAYACAAMABAADAAAAAAABAA4AAAAKAAAAAQAAAABAAAAgAAAAAAAAACgAAAAAAAA
ADAAAAAAAAAAAAAAAAAAAAAIAAgAAAAEAAgAAAAEAAAAAQAAABQAAAAQABQACAAGAAcADAAAABAA
EAAAAAAAARQQAAAAGAAAAAQAAAAAAAAAAQAAAGEAAAAEAAQABAAAAJgAAABBUlJPVzE=
EOF