Changeset: 9fd4e8345fb2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9fd4e8345fb2
Added Files:
        sql/test/bincopy/Tests/bincopy_timestamps_on_client.stable.err
        sql/test/bincopy/Tests/bincopy_timestamps_on_client.stable.out
        sql/test/bincopy/Tests/bincopy_timestamps_on_server.stable.err
        sql/test/bincopy/Tests/bincopy_timestamps_on_server.stable.out
Branch: copybinary
Log Message:

Support temporal types in COPY BINARY


diffs (truncated from 366 to 300 lines):

diff --git a/sql/test/bincopy/Tests/bincopy_timestamps_on_client.stable.err 
b/sql/test/bincopy/Tests/bincopy_timestamps_on_client.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/bincopy/Tests/bincopy_timestamps_on_client.stable.err
@@ -0,0 +1,33 @@
+stderr of test 'bincopy_timestamps_on_client` in directory 'sql/test/bincopy` 
itself:
+
+
+# 13:31:04 >  
+# 13:31:04 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_listenaddr=all" "--set" "mapi_port=34743" "--set" 
"mapi_usock=/var/tmp/mtest-22427/.s.monetdb.34743" "--forcemito" 
"--dbpath=/home/jvr/monets/copybinary/inst/var/MonetDB/mTests_sql_test_bincopy" 
"--set" "embedded_c=true"
+# 13:31:04 >  
+
+# builtin opt  gdk_dbpath = 
/home/jvr/monets/copybinary/inst/var/monetdb5/dbfarm/demo
+# builtin opt  mapi_port = 50000
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# builtin opt  raw_strings = false
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_listenaddr = all
+# cmdline opt  mapi_port = 34743
+# cmdline opt  mapi_usock = /var/tmp/mtest-22427/.s.monetdb.34743
+# cmdline opt  gdk_dbpath = 
/home/jvr/monets/copybinary/inst/var/MonetDB/mTests_sql_test_bincopy
+# cmdline opt  embedded_c = true
+
+# 13:31:04 >  
+# 13:31:04 >  "/home/jvr/lib/pyenv/versions/3.8.0/bin/python3.8" 
"bincopy_timestamps_on_client.SQL.py" "bincopy_timestamps_on_client"
+# 13:31:04 >  
+
+
+# 13:31:09 >  
+# 13:31:09 >  mclient -lsql -ftest -tnone -Eutf-8 -i -e 
--host=/var/tmp/mtest-22427 --port=34743 --database=mTests_sql_test_bincopy
+# 13:31:09 >  
+
+
+# 13:31:10 >  
+# 13:31:10 >  "Done."
+# 13:31:10 >  
+
diff --git a/sql/test/bincopy/Tests/bincopy_timestamps_on_client.stable.out 
b/sql/test/bincopy/Tests/bincopy_timestamps_on_client.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/bincopy/Tests/bincopy_timestamps_on_client.stable.out
@@ -0,0 +1,140 @@
+stdout of test 'bincopy_timestamps_on_client` in directory 'sql/test/bincopy` 
itself:
+
+
+# 13:31:04 >  
+# 13:31:04 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_listenaddr=all" "--set" "mapi_port=34743" "--set" 
"mapi_usock=/var/tmp/mtest-22427/.s.monetdb.34743" "--forcemito" 
"--dbpath=/home/jvr/monets/copybinary/inst/var/MonetDB/mTests_sql_test_bincopy" 
"--set" "embedded_c=true"
+# 13:31:04 >  
+
+# MonetDB 5 server v11.40.0 (hg id: 694c4c5377)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_bincopy', using 8 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 31.139 GiB available main-memory of which we use 25.378 GiB
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://hank:34743/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-22427/.s.monetdb.34743
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+# 13:31:04 >  
+# 13:31:04 >  "/home/jvr/lib/pyenv/versions/3.8.0/bin/python3.8" 
"bincopy_timestamps_on_client.SQL.py" "bincopy_timestamps_on_client"
+# 13:31:04 >  
+
+
+# 13:31:09 >  
+# 13:31:09 >  mclient -lsql -ftest -tnone -Eutf-8 -i -e 
--host=/var/tmp/mtest-22427 --port=34743 --database=mTests_sql_test_bincopy
+# 13:31:09 >  
+
+#START TRANSACTION;
+#CREATE TABLE foo(
+#    id INT NOT NULL,
+#    ts TIMESTAMP,
+#    dt DATE,
+#    tm TIME,
+#    "year" SMALLINT,
+#    "month" TINYINT,
+#    "day" TINYINT,
+#    "hour" TINYINT,
+#    "minute" TINYINT,
+#    "second" TINYINT,
+#    ms INTEGER
+#);
+#COPY BINARY INTO foo(id, ts, dt, tm, "year", "month", "day", "hour", 
"minute", "second", ms)
+#FROM R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_ints.bin',
+#     R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_timestamps.bin',
+#     R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_timestamp_dates.bin',
+#     R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_timestamp_times.bin',
+#     R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_timestamp_years.bin',
+[ 1000000      ]
+#SELECT * FROM foo
+#    WHERE EXTRACT(YEAR FROM ts) <> "year"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(MONTH FROM ts) <> "month"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(DAY FROM ts) <> "day"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(HOUR FROM ts) <> "hour"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(MINUTE FROM ts) <> "minute"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE 1000000 * EXTRACT(SECOND FROM ts) <> 1000000 * "second" + ms
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(YEAR FROM dt) <> "year"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(MONTH FROM dt) <> "month"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(DAY FROM dt) <> "day"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(HOUR FROM tm) <> "hour"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(MINUTE FROM tm) <> "minute"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE 1000000 * EXTRACT(SECOND FROM tm) <> 1000000 * "second" + ms
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#ROLLBACK;
+
+# 13:31:10 >  
+# 13:31:10 >  "Done."
+# 13:31:10 >  
+
diff --git a/sql/test/bincopy/Tests/bincopy_timestamps_on_server.stable.err 
b/sql/test/bincopy/Tests/bincopy_timestamps_on_server.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/bincopy/Tests/bincopy_timestamps_on_server.stable.err
@@ -0,0 +1,33 @@
+stderr of test 'bincopy_timestamps_on_server` in directory 'sql/test/bincopy` 
itself:
+
+
+# 13:31:10 >  
+# 13:31:10 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_listenaddr=all" "--set" "mapi_port=34743" "--set" 
"mapi_usock=/var/tmp/mtest-22427/.s.monetdb.34743" "--forcemito" 
"--dbpath=/home/jvr/monets/copybinary/inst/var/MonetDB/mTests_sql_test_bincopy" 
"--set" "embedded_c=true"
+# 13:31:10 >  
+
+# builtin opt  gdk_dbpath = 
/home/jvr/monets/copybinary/inst/var/monetdb5/dbfarm/demo
+# builtin opt  mapi_port = 50000
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# builtin opt  raw_strings = false
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_listenaddr = all
+# cmdline opt  mapi_port = 34743
+# cmdline opt  mapi_usock = /var/tmp/mtest-22427/.s.monetdb.34743
+# cmdline opt  gdk_dbpath = 
/home/jvr/monets/copybinary/inst/var/MonetDB/mTests_sql_test_bincopy
+# cmdline opt  embedded_c = true
+
+# 13:31:10 >  
+# 13:31:10 >  "/home/jvr/lib/pyenv/versions/3.8.0/bin/python3.8" 
"bincopy_timestamps_on_server.SQL.py" "bincopy_timestamps_on_server"
+# 13:31:10 >  
+
+
+# 13:31:10 >  
+# 13:31:10 >  mclient -lsql -ftest -tnone -Eutf-8 -i -e 
--host=/var/tmp/mtest-22427 --port=34743 --database=mTests_sql_test_bincopy
+# 13:31:10 >  
+
+
+# 13:31:11 >  
+# 13:31:11 >  "Done."
+# 13:31:11 >  
+
diff --git a/sql/test/bincopy/Tests/bincopy_timestamps_on_server.stable.out 
b/sql/test/bincopy/Tests/bincopy_timestamps_on_server.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/bincopy/Tests/bincopy_timestamps_on_server.stable.out
@@ -0,0 +1,140 @@
+stdout of test 'bincopy_timestamps_on_server` in directory 'sql/test/bincopy` 
itself:
+
+
+# 13:31:10 >  
+# 13:31:10 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_listenaddr=all" "--set" "mapi_port=34743" "--set" 
"mapi_usock=/var/tmp/mtest-22427/.s.monetdb.34743" "--forcemito" 
"--dbpath=/home/jvr/monets/copybinary/inst/var/MonetDB/mTests_sql_test_bincopy" 
"--set" "embedded_c=true"
+# 13:31:10 >  
+
+# MonetDB 5 server v11.40.0 (hg id: 694c4c5377)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_bincopy', using 8 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 31.139 GiB available main-memory of which we use 25.378 GiB
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://hank:34743/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-22427/.s.monetdb.34743
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+# 13:31:10 >  
+# 13:31:10 >  "/home/jvr/lib/pyenv/versions/3.8.0/bin/python3.8" 
"bincopy_timestamps_on_server.SQL.py" "bincopy_timestamps_on_server"
+# 13:31:10 >  
+
+
+# 13:31:10 >  
+# 13:31:10 >  mclient -lsql -ftest -tnone -Eutf-8 -i -e 
--host=/var/tmp/mtest-22427 --port=34743 --database=mTests_sql_test_bincopy
+# 13:31:10 >  
+
+#START TRANSACTION;
+#CREATE TABLE foo(
+#    id INT NOT NULL,
+#    ts TIMESTAMP,
+#    dt DATE,
+#    tm TIME,
+#    "year" SMALLINT,
+#    "month" TINYINT,
+#    "day" TINYINT,
+#    "hour" TINYINT,
+#    "minute" TINYINT,
+#    "second" TINYINT,
+#    ms INTEGER
+#);
+#COPY BINARY INTO foo(id, ts, dt, tm, "year", "month", "day", "hour", 
"minute", "second", ms)
+#FROM R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_ints.bin',
+#     R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_timestamps.bin',
+#     R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_timestamp_dates.bin',
+#     R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_timestamp_times.bin',
+#     R'${TSTTRGBASE}/mTests/sql/test/bincopy/bincopy_timestamp_years.bin',
+[ 1000000      ]
+#SELECT * FROM foo
+#    WHERE EXTRACT(YEAR FROM ts) <> "year"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(MONTH FROM ts) <> "month"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(DAY FROM ts) <> "day"
+#    LIMIT 4;
+% sys.foo,     sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo,        sys.foo,        sys.foo,        sys.foo,        sys.foo,        
sys.foo # table_name
+% id,  ts,     dt,     tm,     year,   month,  day,    hour,   minute, second, 
ms # name
+% int, timestamp,      date,   time,   smallint,       tinyint,        
tinyint,        tinyint,        tinyint,        tinyint,        int # type
+% 1,   26,     10,     8,      1,      1,      1,      1,      1,      1,      
1 # length
+#SELECT * FROM foo
+#    WHERE EXTRACT(HOUR FROM ts) <> "hour"
+#    LIMIT 4;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to