Changeset: f93d6fbf9870 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f93d6fbf9870
Added Files:
        sql/test/copy/Tests/int_parse_best.test
Branch: mtest
Log Message:

converted int_parse_best (change NULL input (empty) into double quotes "" as 
test is more for a different null
value, doesn't need to be empty)


diffs (144 lines):

diff --git a/sql/test/copy/Tests/int_parse_best.test 
b/sql/test/copy/Tests/int_parse_best.test
new file mode 100644
--- /dev/null
+++ b/sql/test/copy/Tests/int_parse_best.test
@@ -0,0 +1,139 @@
+statement ok
+start transaction
+
+statement ok
+create table t_int(i int)
+
+statement ok
+copy 1 records into t_int from stdin USING DELIMITERS ',',E'\n','"' NULL AS '' 
best effort
+<COPY_INTO_DATA>
+""
+
+query I rowsort
+select * from t_int
+----
+NULL
+
+query IITT rowsort
+select * from sys.rejects
+----
+
+query IITT rowsort
+call sys.clearrejects()
+----
+
+statement ok
+delete from t_int
+
+statement ok
+copy 2 records into t_int from stdin USING DELIMITERS ',',E'\n','"' NULL AS '' 
best effort
+<COPY_INTO_DATA>
+3.00
+-4.0000
+
+query I nosort
+select * from t_int
+----
+3
+-4
+
+query IITT rowsort
+select * from sys.rejects
+----
+
+query IITT rowsort
+call sys.clearrejects()
+----
+
+statement ok
+delete from t_int
+
+statement ok
+copy 3 records into t_int from stdin USING DELIMITERS ',',E'\n','"' NULL AS '' 
best effort
+<COPY_INTO_DATA>
+0
+5.1
+9
+
+query I nosort
+select * from t_int
+----
+0
+9
+
+query IITT rowsort
+select * from sys.rejects
+----
+2
+1
+line 2 field i 'int' expected in '5.1'
+5.1@
+
+query IITT rowsort
+call sys.clearrejects()
+----
+2
+1
+line 2 field i 'int' expected in '5.1'
+5.1@
+
+statement ok
+delete from t_int
+
+statement ok
+copy 5 records into t_int from stdin delimiters ',',E'\n' NULL as '""' best 
effort
+<COPY_INTO_DATA>
+1
+nil
+""
+null
+abc
+
+query I rowsort
+select * from t_int
+----
+1
+NULL
+
+query IITT rowsort
+select * from sys.rejects
+----
+2
+1
+line 2 field i 'int' expected in 'nil'
+nil@
+4
+1
+line 4 field i 'int' expected in 'null'
+null@
+5
+1
+line 5 field i 'int' expected in 'abc'
+abc@
+
+query IITT rowsort
+call sys.clearrejects()
+----
+2
+1
+line 2 field i 'int' expected in 'nil'
+nil@
+4
+1
+line 4 field i 'int' expected in 'null'
+null@
+5
+1
+line 5 field i 'int' expected in 'abc'
+abc@
+
+statement ok
+delete from t_int
+
+statement ok
+drop table t_int
+
+statement ok
+rollback
+
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to