File: csv_line_too_long.test

package info (click to toggle)
duckdb 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 299,196 kB
  • sloc: cpp: 865,414; ansic: 57,292; python: 18,871; sql: 12,663; lisp: 11,751; yacc: 7,412; lex: 1,682; sh: 747; makefile: 558
file content (28 lines) | stat: -rw-r--r-- 975 bytes parent folder | download | duplicates (3)
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
# name: test/sql/copy/csv/csv_line_too_long.test
# description: Test that verifies that the CSV has long lines and properly errors that
# group: [csv]

statement ok
PRAGMA enable_verification

statement ok
CREATE TABLE T1 (name VARCHAR);

foreach header true false

statement error
COPY T1(name) from '{DATA_DIR}/csv/line_too_long.csv.gz' (DELIMITER ',', HEADER ${header} , COMPRESSION gzip, ALLOW_QUOTED_NULLS false);
----
Maximum line size of 2000000 bytes exceeded

statement error
COPY T1(name) from '{DATA_DIR}/csv/line_too_long_with_newline.csv.gz' (DELIMITER ',', HEADER ${header} , COMPRESSION gzip, ALLOW_QUOTED_NULLS false);
----
Possible Solution: Change the maximum length size, e.g., max_line_size=2097165

statement error
COPY T1(name) from '{DATA_DIR}/csv/multiple_line_too_long.csv.gz' (DELIMITER ',', HEADER ${header} , COMPRESSION gzip, ALLOW_QUOTED_NULLS false);
----
Possible Solution: Change the maximum length size, e.g., max_line_size=2097165

endloop