Changeset: ffda3e46cbe0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ffda3e46cbe0
Modified Files:
sql/server/rel_dump.c
sql/test/SQLancer/Tests/sqlancer19.SQL.py
Branch: Jul2021
Log Message:
not null and expression properties must be parsed before
diffs (48 lines):
diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -1293,6 +1293,16 @@ exp_read(mvc *sql, sql_rel *lrel, sql_re
return NULL;
}
+ /* [ NOT NULL ] */
+ if (strncmp(r+*pos, "NOT NULL", strlen("NOT NULL")) == 0) {
+ (*pos)+= (int) strlen("NOT NULL");
+ skipWS(r, pos);
+ set_has_no_nil(exp);
+ }
+
+ if (!(exp = read_exp_properties(sql, exp, r, pos)))
+ return NULL;
+
if (r[*pos] == '!') {
(*pos)++;
skipWS(r, pos);
@@ -1429,15 +1439,6 @@ exp_read(mvc *sql, sql_rel *lrel, sql_re
skipWS(r, pos);
set_nulls_last(exp);
}
- /* [ NOT NULL ] */
- if (strncmp(r+*pos, "NOT NULL", strlen("NOT NULL")) == 0) {
- (*pos)+= (int) strlen("NOT NULL");
- skipWS(r, pos);
- set_has_no_nil(exp);
- }
-
- if (!(exp = read_exp_properties(sql, exp, r, pos)))
- return NULL;
/* as alias */
if (strncmp(r+*pos, "as", 2) == 0) {
diff --git a/sql/test/SQLancer/Tests/sqlancer19.SQL.py
b/sql/test/SQLancer/Tests/sqlancer19.SQL.py
--- a/sql/test/SQLancer/Tests/sqlancer19.SQL.py
+++ b/sql/test/SQLancer/Tests/sqlancer19.SQL.py
@@ -36,6 +36,8 @@ with SQLTestCase() as cli:
.assertSucceeded().assertDataResultMatch([(False,),(False,),(False,),(True,),(True,),(True,)])
cli.execute('MERGE INTO t0 USING (SELECT 1 FROM rt1) AS mergejoined(c0) ON
TRUE WHEN NOT MATCHED THEN INSERT (c0) VALUES (INTERVAL \'5\' SECOND);') \
.assertSucceeded().assertRowCount(0)
+ cli.execute('SELECT 1 FROM (values (0)) mv(vc0) LEFT OUTER JOIN (SELECT 1
FROM rt1) AS sub0(c0) ON 2 = 0.05488666234725814;') \
+ .assertSucceeded().assertDataResultMatch([(1,),])
cli.execute("ROLLBACK;")
cli.execute("""
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list