ClickHouse/tests/queries/0_stateless/02895_npy_format.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
4.5 KiB
Bash
Raw Normal View History

2023-10-25 10:37:05 +00:00
#!/usr/bin/env bash
# Tags: no-fasttest
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_float.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_str.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_unicode.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/two_dim.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/two_dim_float.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/two_dim_str.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/two_dim_unicode.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/two_dim_bool.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/two_dim_null.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/three_dim.npy')"
2024-04-30 14:37:07 +00:00
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/none_endian_array.npy')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/big_endian_array.npy')"
2023-10-31 18:10:55 +00:00
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/one_dim.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/one_dim_float.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/one_dim_str.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/one_dim_unicode.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/two_dim.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/two_dim_float.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/two_dim_str.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/two_dim_unicode.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/two_dim_bool.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/two_dim_null.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/three_dim.npy')"
2024-04-30 14:37:07 +00:00
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/none_endian_array.npy')"
$CLICKHOUSE_LOCAL -q "describe file('$CURDIR/data_npy/big_endian_array.npy')"
2023-10-31 18:10:55 +00:00
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim.npy', Npy, 'value UInt8')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim.npy', Npy, 'value UInt16')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim.npy', Npy, 'value UInt32')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim.npy', Npy, 'value UInt64')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim.npy', Npy, 'value Int8')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim.npy', Npy, 'value Int16')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim.npy', Npy, 'value Int32')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim.npy', Npy, 'value Int64')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_float.npy', Npy, 'value Float32')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_float.npy', Npy, 'value Float64')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_str.npy', Npy, 'value FixedString(1)')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_str.npy', Npy, 'value String')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/two_dim.npy', Npy, 'value Array(Int8)')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/three_dim.npy', Npy, 'value Array(Array(Int8))')"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_float.npy', Npy, 'value Array(Float32)')" 2>&1 | grep -c "BAD_ARGUMENTS"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_float.npy', Npy, 'value UUID')" 2>&1 | grep -c "BAD_ARGUMENTS"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_float.npy', Npy, 'value Tuple(UInt8)')" 2>&1 | grep -c "BAD_ARGUMENTS"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_float.npy', Npy, 'value Int8')" 2>&1 | grep -c "BAD_ARGUMENTS"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_str.npy', Npy, 'value Int8')" 2>&1 | grep -c "BAD_ARGUMENTS"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/one_dim_unicode.npy', Npy, 'value Float32')" 2>&1 | grep -c "BAD_ARGUMENTS"
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/complex.npy')" 2>&1 | grep -c "BAD_ARGUMENTS"
2023-11-07 17:56:02 +00:00
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/float_16.npy')"
2023-11-14 13:15:14 +00:00
$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_npy/npy_inf_nan_null.npy')"