Changeset: 01e079d1628a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=01e079d1628a
Modified Files:
sql/test/pg_regress/Tests/interval.sql
sql/test/pg_regress/Tests/interval.stable.err
sql/test/pg_regress/Tests/interval.stable.out
Branch: default
Log Message:
Removing tests which produce overflow errors. Approve new outputs
diffs (196 lines):
diff --git a/sql/test/pg_regress/Tests/interval.sql
b/sql/test/pg_regress/Tests/interval.sql
--- a/sql/test/pg_regress/Tests/interval.sql
+++ b/sql/test/pg_regress/Tests/interval.sql
@@ -72,17 +72,15 @@ SELECT '' AS ten, INTERVAL_TBL.* FROM IN
-- updating pg_aggregate.agginitval
select avg(f1) from interval_tbl;
-
select avg(cast(f1 as double)) from interval_tbl;
select avg(cast(f1 as decimal)) from interval_tbl;
-select avg(cast(f1 as decimal(9,3))) from interval_tbl;
-select avg(cast(f1 as integer)) from interval_tbl;
+select avg(cast(f1 as decimal(22,3))) from interval_tbl;
select min(f1) from interval_tbl;
select max(f1) from interval_tbl;
select sum(f1) from interval_tbl;
-select sum(cast(f1 as integer)) from interval_tbl;
+select sum(cast(f1 as decimal(22,3))) from interval_tbl;
select count(f1) from interval_tbl;
select count(distinct f1) from interval_tbl;
diff --git a/sql/test/pg_regress/Tests/interval.stable.err
b/sql/test/pg_regress/Tests/interval.stable.err
--- a/sql/test/pg_regress/Tests/interval.stable.err
+++ b/sql/test/pg_regress/Tests/interval.stable.err
@@ -30,107 +30,99 @@ stderr of test 'interval` in directory '
# 12:56:39 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-27974" "--port=31190"
# 12:56:39 >
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT cast('01:00' as interval second) AS "One hour";
ERROR = !wrong format (01:00)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT cast('+02:00' as interval second) AS "Two hours";
ERROR = !wrong format (+02:00)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT cast('-08:00' as interval second) AS "Eight hours";
ERROR = !wrong format (-08:00)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT cast('-1 +02:03' as interval second) AS "22 hours ago...";
ERROR = !wrong format (-1 +02:03)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT cast('-1 days +02:03' as interval second) AS "22 hours ago...";
ERROR = !wrong format (-1 days +02:03)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT cast('10 years -11 month -12 days +13:14' as interval second)
AS "9 years...";
ERROR = !wrong format (10 years -11 month -12 days +13:14)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('1 day 2 hours 3 minutes 4
seconds');
ERROR = !wrong format (1 day 2 hours 3 minutes 4 seconds)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('6 years');
ERROR = !wrong format (6 years)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('5 months');
ERROR = !wrong format (5 months)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('5 months 12 hours');
ERROR = !wrong format (5 months 12 hours)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 1 minute');
ERROR = !wrong format (@ 1 minute)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 5 hour');
ERROR = !wrong format (@ 5 hour)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 10 day');
ERROR = !wrong format (@ 10 day)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 34 year');
ERROR = !wrong format (@ 34 year)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 3 months');
ERROR = !wrong format (@ 3 months)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 14 seconds ago');
ERROR = !wrong format (@ 14 seconds ago)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('badly formatted interval');
ERROR = !wrong format (badly formatted interval)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 30 eons ago');
ERROR = !wrong format (@ 30 eons ago)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT '' AS nine, INTERVAL_TBL.* FROM INTERVAL_TBL
WHERE INTERVAL_TBL.f1 <> cast('@ 10 days' as interval second);
ERROR = !wrong format (@ 10 days)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT '' AS three, INTERVAL_TBL.* FROM INTERVAL_TBL
WHERE INTERVAL_TBL.f1 <= cast('@ 5 hours' as interval second);
ERROR = !wrong format (@ 5 hours)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT '' AS three, INTERVAL_TBL.* FROM INTERVAL_TBL
WHERE INTERVAL_TBL.f1 < cast('@ 1 day' as interval second);
ERROR = !wrong format (@ 1 day)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT '' AS one, INTERVAL_TBL.* FROM INTERVAL_TBL
WHERE INTERVAL_TBL.f1 = cast('@ 34 years' as interval second);
ERROR = !wrong format (@ 34 years)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT '' AS five, INTERVAL_TBL.* FROM INTERVAL_TBL
WHERE INTERVAL_TBL.f1 >= cast('@ 1 month' as interval second);
ERROR = !wrong format (@ 1 month)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = SELECT '' AS nine, INTERVAL_TBL.* FROM INTERVAL_TBL
WHERE INTERVAL_TBL.f1 > cast('@ 3 seconds ago' as interval second);
ERROR = !wrong format (@ 3 seconds ago)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = select avg(f1) from interval_tbl;
ERROR = !types sec_interval(13,0) and double(53,0) are not equal for column
'f1'
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = select avg(cast(f1 as double)) from interval_tbl;
ERROR = !types sec_interval(13,0) and double(53,0) are not equal for column
'f1'
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = select avg(cast(f1 as decimal)) from interval_tbl;
ERROR = !too many digits (22 > 18)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
-QUERY = select avg(cast(f1 as decimal(9,3))) from interval_tbl;
-ERROR = !too many digits (22 > 9)
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
-QUERY = select avg(cast(f1 as integer)) from interval_tbl;
-ERROR = !overflow in conversion of -1363962815083169272 to int.
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
+MAPI = (monetdb) /var/tmp/mtest-21889/.s.monetdb.34286
QUERY = select sum(f1) from interval_tbl;
-ERROR = !overflow in conversion of -1363962815083169272 to bte.
-MAPI = (monetdb) /var/tmp/mtest-18336/.s.monetdb.30933
-QUERY = select sum(cast(f1 as integer)) from interval_tbl;
-ERROR = !overflow in conversion of 63513504000000 to int.
+ERROR = !overflow in conversion of -1000 to bte.
-# 12:56:40 >
-# 12:56:40 > "Done."
-# 12:56:40 >
+# 15:52:24 >
+# 15:52:24 > "Done."
+# 15:52:24 >
+
diff --git a/sql/test/pg_regress/Tests/interval.stable.out
b/sql/test/pg_regress/Tests/interval.stable.out
--- a/sql/test/pg_regress/Tests/interval.stable.out
+++ b/sql/test/pg_regress/Tests/interval.stable.out
@@ -80,6 +80,12 @@ Ready.
[ "", -1.000 ]
[ "", -1363962815083169.272 ]
[ "", -5670419503621183.312 ]
+#select avg(cast(f1 as decimal(22,3))) from interval_tbl;
+% sys.L2 # table_name
+% L2 # name
+% double # type
+% 24 # length
+[ -1.406863761e+18 ]
#select min(f1) from interval_tbl;
% sys.L1 # table_name
% L1 # name
@@ -92,6 +98,12 @@ Ready.
% sec_interval # type
% 0 # length
[ 63513504000.000 ]
+#select sum(cast(f1 as decimal(22,3))) from interval_tbl;
+% sys.L2 # table_name
+% L2 # name
+% decimal # type
+% 24 # length
+[ -7034318805200352350.000 ]
#select count(f1) from interval_tbl;
% sys.L1 # table_name
% L1 # name
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list