Changeset: 21771e1c175f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/21771e1c175f
Modified Files:
monetdb5/modules/mal/pp_hash.c
sql/test/BugTracker-2025/Tests/7650_right_join_crash.test
sql/test/BugTracker-2025/Tests/All
Branch: pp_hashjoin
Log Message:
handle is_semantics and floats/doubles better
diffs (53 lines):
diff --git a/monetdb5/modules/mal/pp_hash.c b/monetdb5/modules/mal/pp_hash.c
--- a/monetdb5/modules/mal/pp_hash.c
+++ b/monetdb5/modules/mal/pp_hash.c
@@ -2257,7 +2257,9 @@ OAHASHmprobe(Client ctx, bat *PRB_oid, b
\
gid hsh = (gid)combine(gi[i],
_hash_##Type(*(((BaseType*)ky)+sltd[i]-off)), prime)&ht->mask; \
gid slot = ATOMIC_GET(ht->gids+hsh); \
- while (slot && (pgids[slot] != gi[i] ||
(is_##Type##_nil(vals[slot]) != is_##Type##_nil(val)) || vals[slot] != val)) { \
+ while (slot && (pgids[slot] != gi[i] || \
+ ((*semantics) &&
is_##Type##_nil(val) && !is_##Type##_nil(vals[slot])) || \
+ (!is_##Type##_nil(val) &&
vals[slot] != val))) { \
hsh++; \
hsh &= ht->mask; \
slot = ATOMIC_GET(ht->gids+hsh); \
@@ -2587,7 +2589,9 @@ OAHASHprobe_cmbd(Client ctx, bat *PRB_oi
} \
gid hsh = (gid)combine(gi[i],
_hash_##Type(*(((BaseType*)ky)+sltd[i]-off)), prime)&ht->mask; \
gid slot = ATOMIC_GET(ht->gids+hsh); \
- while (slot && (pgids[slot] != gi[i] ||
(is_##Type##_nil(vals[slot]) != is_##Type##_nil(val)) || vals[slot] != val)) { \
+ while (slot && (pgids[slot] != gi[i] || \
+ ((*semantics) &&
is_##Type##_nil(val) && !is_##Type##_nil(vals[slot])) || \
+ (!is_##Type##_nil(val) &&
vals[slot] != val))) { \
hsh++; \
hsh &= ht->mask; \
slot = ATOMIC_GET(ht->gids+hsh); \
diff --git a/sql/test/BugTracker-2025/Tests/7650_right_join_crash.test
b/sql/test/BugTracker-2025/Tests/7650_right_join_crash.test
--- a/sql/test/BugTracker-2025/Tests/7650_right_join_crash.test
+++ b/sql/test/BugTracker-2025/Tests/7650_right_join_crash.test
@@ -3,10 +3,6 @@ CREATE TABLE IF NOT EXISTS t1(c0 INTERVA
# error because the relational algebra doesn't allow for perfect lazy
evaluation always
# sql correct result should be: NULL | NULL | 0
-#statement error GDK reported error: selectjoin: more than one match
-query TTI
+statement error /more than one match/
SELECT ALL * FROM t1 RIGHT JOIN (VALUES (0)) AS subQuery1(col_1) ON ( t1.c0 <
ANY(VALUES (t1.c0+t1.c0)) ) AND (VALUES (subQuery1.col_1), (EXISTS (VALUES
(t1.c2))) )
-----
-NULL
-NULL
-0
+
diff --git a/sql/test/BugTracker-2025/Tests/All
b/sql/test/BugTracker-2025/Tests/All
--- a/sql/test/BugTracker-2025/Tests/All
+++ b/sql/test/BugTracker-2025/Tests/All
@@ -18,7 +18,7 @@ HAVE_HGE?7637_str_to_decimal
7646_leftjoin_crash
7647-munion-optimizer-bug
7648_rightjoin_crash
-PIPELINE?7650_right_join_crash
+7650_right_join_crash
7653_incorrect_join_results
7654_non_monetdb_user_remote_table_exec
7656_incorrect_error
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]