Changeset: 7ff84bea66d4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ff84bea66d4
Modified Files:
sql/common/sql_types.c
sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out
Branch: Nov2019
Log Message:
Allow conversion from month interval to decimal and float.
This fixes the second part of bug 6793.
diffs (33 lines):
diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c
--- a/sql/common/sql_types.c
+++ b/sql/common/sql_types.c
@@ -110,7 +110,7 @@ static int convert_matrix[EC_MAX][EC_MAX
/* EC_BLOB */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
/* EC_POS */ { 0, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 },
/* EC_NUM */ { 0, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 },
-/* EC_MONTH*/ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0 },
+/* EC_MONTH*/ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0 },
/* EC_SEC*/ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0 },
/* EC_DEC */ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0 },
/* EC_FLT */ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 3, 1, 1, 0, 0, 0, 0, 0 },
diff --git a/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out
b/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out
--- a/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out
+++ b/sql/test/BugTracker-2019/Tests/cast-interval.Bug-6793.stable.out
@@ -69,7 +69,7 @@ stdout of test 'cast-interval.Bug-6793`
% sys.interval_tbl, sys.L1 # table_name
% f1, L1 # name
% month_interval, decimal # type
-% 1, 5 # length
+% 1, 4 # length
[ 1, 1 ]
[ 2, 2 ]
[ 3, 3 ]
@@ -88,7 +88,7 @@ stdout of test 'cast-interval.Bug-6793`
% L2, L3, L5, L7, L11 # name
% bigint, month_interval, int, decimal, real # type
% 1, 2, 2, 10, 15 # length
-[ 4, 10, 10, 10.000, 10.000 ]
+[ 4, 10, 10, 10.000, 10 ]
#DROP TABLE INTERVAL_TBL;
# 13:25:36 >
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list