This commit is contained in:
avogar 2022-07-21 07:53:11 +00:00
parent b0e7d348f1
commit 394fcf33ef

View File

@ -158,8 +158,10 @@ echo "CSV"
echo -e "42,Some string,'[1, 2, 3, 4]','[(1, 2, 3)]'
42\,abcd,'[]','[(4, 5, 6)]'" > $DATA_FILE
$CLICKHOUSE_CLIENT -q "desc file('$FILE_NAME', 'CSV')"
$CLICKHOUSE_CLIENT -q "select * from file('$FILE_NAME', 'CSV')"
CLIENT_CMD="$CLICKHOUSE_CLIENT --format_csv_allow_single_quotes=1"
$CLIENT_CMD -q "desc file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "select * from file('$FILE_NAME', 'CSV')"
echo -e "\"[({'key' : 42.42}, ['String', 'String2'], 42.42), ({}, [], -42), ({'key2' : NULL}, [NULL], NULL)]\"
'[]'
@ -168,8 +170,8 @@ echo -e "\"[({'key' : 42.42}, ['String', 'String2'], 42.42), ({}, [], -42), ({'k
\"[({}, ['String3'], NULL)]\"
\"[({'key3': NULL}, []), NULL]\""> $DATA_FILE
$CLICKHOUSE_CLIENT -q "desc file('$FILE_NAME', 'CSV') settings input_format_csv_use_best_effort_in_schema_inference=false"
$CLICKHOUSE_CLIENT -q "select * from file('$FILE_NAME', 'CSV') settings input_format_csv_use_best_effort_in_schema_inference=false"
$CLIENT_CMD -q "desc file('$FILE_NAME', 'CSV') settings input_format_csv_use_best_effort_in_schema_inference=false"
$CLIENT_CMD -q "select * from file('$FILE_NAME', 'CSV') settings input_format_csv_use_best_effort_in_schema_inference=false"
echo -e "\"[({'key' : 42.42}, ['String', 'String2'], 42.42), ({}, [], -42), ({'key2' : NULL}, [NULL], NULL)]\"
'[]'
@ -178,43 +180,43 @@ echo -e "\"[({'key' : 42.42}, ['String', 'String2'], 42.42), ({}, [], -42), ({'k
\"[({}, ['String3'], NULL)]\"
\"[({'key3': NULL}, [], NULL)]\""> $DATA_FILE
$CLICKHOUSE_CLIENT -q "desc file('$FILE_NAME', 'CSV')"
$CLICKHOUSE_CLIENT -q "select * from file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "desc file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "select * from file('$FILE_NAME', 'CSV')"
echo -e "true
false
\N" > $DATA_FILE
$CLICKHOUSE_CLIENT -q "desc file('$FILE_NAME', 'CSV')"
$CLICKHOUSE_CLIENT -q "select * from file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "desc file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "select * from file('$FILE_NAME', 'CSV')"
echo -e "'[true, NULL]'
'[]'
'[NULL]'
'[false]'" > $DATA_FILE
$CLICKHOUSE_CLIENT -q "desc file('$FILE_NAME', 'CSV')"
$CLICKHOUSE_CLIENT -q "select * from file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "desc file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "select * from file('$FILE_NAME', 'CSV')"
echo -e "'(1, 2, 3)'"> $DATA_FILE
$CLICKHOUSE_CLIENT -q "desc file('$FILE_NAME', 'CSV')"
$CLICKHOUSE_CLIENT -q "select * from file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "desc file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "select * from file('$FILE_NAME', 'CSV')"
echo -e "'123.123'"> $DATA_FILE
echo -e '"123.123"'> $DATA_FILE
$CLICKHOUSE_CLIENT -q "desc file('$FILE_NAME', 'CSV')"
$CLICKHOUSE_CLIENT -q "select * from file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "desc file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "select * from file('$FILE_NAME', 'CSV')"
echo -e "'[(1, 2, 3)]'"> $DATA_FILE
$CLICKHOUSE_CLIENT -q "desc file('$FILE_NAME', 'CSV')"
$CLICKHOUSE_CLIENT -q "select * from file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "desc file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "select * from file('$FILE_NAME', 'CSV')"
echo -e "\"[(1, 2, 3)]\""> $DATA_FILE
$CLICKHOUSE_CLIENT -q "desc file('$FILE_NAME', 'CSV')"
$CLICKHOUSE_CLIENT -q "select * from file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "desc file('$FILE_NAME', 'CSV')"
$CLIENT_CMD -q "select * from file('$FILE_NAME', 'CSV')"