mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
29 lines
1.3 KiB
Bash
Executable File
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
|