1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
# name: test/sql/copy/csv/csv_duck_fuzz.test
# description: Issues found from DuckFuzz regarding the CSV Reader
# group: [csv]
statement ok
PRAGMA enable_verification
# The important thing here is that we don't crash, some parameters accept null values (i.e., delimiter),
# and others will have different error messages, not making it possible to use a regex to test errors.
foreach parameter sep delim quote new_line escape nullstr columns auto_type_candidates header auto_detect sample_size all_varchar dateformat timestampformat normalize_names compression skip max_line_size maximum_line_size ignore_errors store_rejects rejects_table rejects_scan rejects_limit force_not_null buffer_size decimal_separator parallel null_padding allow_quoted_nulls column_types dtypes types names column_names comment encoding strict_mode
statement maybe
SELECT NULL FROM sniff_csv('{DATA_DIR}/csv/14512.csv', ${parameter} := NULL)
----
statement maybe
SELECT NULL FROM read_csv('{DATA_DIR}/csv/14512.csv', ${parameter} := NULL)
----
endloop
statement error
SELECT NULL FROM sniff_csv(NULL)
----
sniff_csv cannot take NULL as a file path parameter
statement error
SELECT NULL FROM read_csv(NULL)
----
read_csv cannot take NULL list as parameter
|