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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
# name: test/sql/copy/csv/test_mixed_new_line.test
# description: Test mixed lines
# group: [csv]
require notwindows
statement ok
pragma enable_verification;
query III
from read_csv('{DATA_DIR}/csv/mixed_new_line.csv', strict_mode=false)
----
1 2 3
4 5 6
7 8 9
foreach newline '\r' '\n' '\r\n'
query III
from read_csv('{DATA_DIR}/csv/mixed_new_line.csv', new_line = ${newline}, strict_mode = false)
----
1 2 3
4 5 6
7 8 9
endloop
statement error
from read_csv('{DATA_DIR}/csv/mixed_new_line.csv', columns = {'a':'integer', 'b':'integer', 'c':'integer'}, new_line = '\r\n', header = false, strict_mode=true, delim = ',')
----
Error when sniffing file "{DATA_DIR}/csv/mixed_new_line.csv".
statement error
from read_csv('{DATA_DIR}/csv/mixed_new_line.csv', columns = {'a':'integer', 'b':'integer', 'c':'integer'}, new_line = '\r\n', header = false, strict_mode=true, delim = ',', auto_detect= false)
----
The CSV Parser state machine reached an invalid state.
query I
select count(*) from read_csv('{DATA_DIR}/csv/mixed_new_line_2.csv', new_line ='\r\n', strict_mode = False, columns = {'a':'varchar', 'b':'varchar'}, delim = ',', ignore_errors = true, header = false)
----
3
statement error
select count(*) from read_csv('{DATA_DIR}/csv/mixed_new_line_2.csv', new_line ='\r\n', strict_mode = False, columns = {'a':'varchar', 'b':'varchar'}, auto_detect = false, delim = ',')
----
Expected Number of Columns: 2 Found: 1
statement error
SELECT column0 like '%one%' and column0 like '%two%' as success FROM read_csv('{DATA_DIR}/csv/one_r_two.csv',new_line ='\r\n', strict_mode = TRUE, HEADER = FALSE)
----
Disable the parser's strict mode (strict_mode=false) to allow reading rows that do not comply with the CSV standard.
statement error
SELECT column0 like '%one%' and column0 like '%two%' as success FROM read_csv('{DATA_DIR}/csv/one_r_two.csv',new_line ='\n', strict_mode = TRUE, HEADER = FALSE)
----
Disable the parser's strict mode (strict_mode=false) to allow reading rows that do not comply with the CSV standard.
query I
SELECT column0 FROM read_csv('{DATA_DIR}/csv/one_r_two.csv',new_line ='\r', strict_mode = TRUE, HEADER = FALSE)
----
one
two
statement error
SELECT column0 like '%one%' and column0 like '%two%' as success FROM read_csv('{DATA_DIR}/csv/one_n_two.csv',new_line ='\r', strict_mode = TRUE, HEADER = FALSE)
----
Disable the parser's strict mode (strict_mode=false) to allow reading rows that do not comply with the CSV standard.
statement error
SELECT column0 like '%one%' and column0 like '%two%' as success FROM read_csv('{DATA_DIR}/csv/one_n_two.csv',new_line ='\r\n', strict_mode = TRUE, HEADER = FALSE)
----
Disable the parser's strict mode (strict_mode=false) to allow reading rows that do not comply with the CSV standard.
query I
SELECT column0 FROM read_csv('{DATA_DIR}/csv/one_n_two.csv',new_line ='\n', strict_mode = TRUE, HEADER = FALSE)
----
one
two
statement error
SELECT column0 like '%one%' and column0 like '%two%' as success FROM read_csv('{DATA_DIR}/csv/one_r_n_two.csv',new_line ='\r', strict_mode = TRUE, HEADER = FALSE)
----
Disable the parser's strict mode (strict_mode=false) to allow reading rows that do not comply with the CSV standard.
statement error
SELECT column0 like '%one%' and column0 like '%two%' as success FROM read_csv('{DATA_DIR}/csv/one_r_n_two.csv',new_line ='\n', strict_mode = TRUE, HEADER = FALSE)
----
Disable the parser's strict mode (strict_mode=false) to allow reading rows that do not comply with the CSV standard.
|