Changeset: 4ed1183f5805 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4ed1183f5805
Modified Files:
gdk/gdk_batop.c
Branch: default
Log Message:
Merge with Dec2025 branch.
diffs (truncated from 449 to 300 lines):
diff --git a/clients/Tests/exports.py b/clients/Tests/exports.py
--- a/clients/Tests/exports.py
+++ b/clients/Tests/exports.py
@@ -4,5 +4,6 @@ import MonetDBtesting.listexports
with open('exports.stable.out') as fil:
stable = fil.readlines()
output = MonetDBtesting.listexports.listexports()
-for line in difflib.unified_diff(stable, output):
+for line in difflib.unified_diff(stable, output,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -3236,6 +3236,16 @@ BATcount_no_nil(BAT *b, BAT *s)
bat_iterator_end(&bi);
return ci.ncand;
}
+ if (BATcheckhash(b)) {
+ BUN p = 0;
+ const void *nil = ATOMnilptr(b->ttype);
+ cnt = ci.ncand;
+ HASHloop(bi, b->thash, p, nil)
+ if (canditer_contains(&ci, p + b->hseqbase))
+ cnt--;
+ bat_iterator_end(&bi);
+ return cnt;
+ }
p = bi.base;
t = ATOMbasetype(bi.type);
switch (t) {
@@ -3288,6 +3298,38 @@ BATcount_no_nil(BAT *b, BAT *s)
cnt += !is_inet6_nil(((const inet6 *)
p)[canditer_next(&ci) - hseq]);
break;
case TYPE_str:
+ if (GDK_ELIMDOUBLES(bi.vh)) {
+ var_t off = strLocate(bi.vh, str_nil);
+ if (off == (var_t) -2) {
+ cnt = ci.ncand;
+ break;
+ }
+ switch (bi.width) {
+ case 1:
+ off -= GDK_VAROFFSET;
+ CAND_LOOP(&ci)
+ cnt += (var_t) ((const uint8_t *)
p)[canditer_next(&ci) - hseq] != off;
+ break;
+ case 2:
+ off -= GDK_VAROFFSET;
+ CAND_LOOP(&ci)
+ cnt += (var_t) ((const uint16_t *)
p)[canditer_next(&ci) - hseq] != off;
+ break;
+ case 4:
+ CAND_LOOP(&ci)
+ cnt += (var_t) ((const uint32_t *)
p)[canditer_next(&ci) - hseq] != off;
+ break;
+#if SIZEOF_VAR_T == 8
+ case 8:
+ CAND_LOOP(&ci)
+ cnt += (var_t) ((const uint64_t *)
p)[canditer_next(&ci) - hseq] != off;
+ break;
+#endif
+ default:
+ MT_UNREACHABLE();
+ }
+ break;
+ }
base = bi.vh->base;
switch (bi.width) {
case 1:
diff --git a/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.py
b/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.py
--- a/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.py
+++ b/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.py
@@ -21,9 +21,9 @@ except AttributeError:
def verify_output(stream, actual, expected):
diff = list(difflib.unified_diff(
expected.splitlines(),
- actual.splitlines(),
- "EXPECTED",
- "ACTUAL",
+ actual.splitlines() ,
+ fromfile='expected',
+ tofile='received',
lineterm=''
))
if not diff:
diff --git
a/sql/test/BugDay_2005-10-06_2.8/Tests/MapiClient-dump.SF-905851.SQL.py
b/sql/test/BugDay_2005-10-06_2.8/Tests/MapiClient-dump.SF-905851.SQL.py
--- a/sql/test/BugDay_2005-10-06_2.8/Tests/MapiClient-dump.SF-905851.SQL.py
+++ b/sql/test/BugDay_2005-10-06_2.8/Tests/MapiClient-dump.SF-905851.SQL.py
@@ -28,7 +28,8 @@ def main():
output = out.splitlines(keepends=True)
with open('MapiClient-dump.SF-905851.stable.out') as fil:
stable = fil.readlines()
- for line in difflib.unified_diff(stable, output):
+ for line in difflib.unified_diff(stable, output,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
main()
diff --git a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.py
b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.py
--- a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.py
+++ b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.py
@@ -75,7 +75,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(f) as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
if len(cltout) != 3 or cltout[0] != 'START TRANSACTION;' or cltout[1] !=
'SET SCHEMA "sys";' or cltout[2] != 'COMMIT;':
diff --git a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.py
b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.py
--- a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.py
+++ b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.py
@@ -75,7 +75,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(f) as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
if len(cltout) != 3 or cltout[0] != 'START TRANSACTION;' or cltout[1] !=
'SET SCHEMA "sys";' or cltout[2] != 'COMMIT;':
diff --git a/sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.py
b/sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.py
--- a/sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.py
+++ b/sql/test/emptydb-previous-upgrade-hge/Tests/upgrade.py
@@ -74,7 +74,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(f) as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
if len(cltout) != 3 or cltout[0] != 'START TRANSACTION;' or cltout[1] !=
'SET SCHEMA "sys";' or cltout[2] != 'COMMIT;':
diff --git a/sql/test/emptydb-previous-upgrade/Tests/upgrade.py
b/sql/test/emptydb-previous-upgrade/Tests/upgrade.py
--- a/sql/test/emptydb-previous-upgrade/Tests/upgrade.py
+++ b/sql/test/emptydb-previous-upgrade/Tests/upgrade.py
@@ -75,7 +75,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(f) as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
if len(cltout) != 3 or cltout[0] != 'START TRANSACTION;' or cltout[1] !=
'SET SCHEMA "sys";' or cltout[2] != 'COMMIT;':
diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py
--- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py
+++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py
@@ -75,7 +75,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(f) as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
if len(cltout) != 3 or cltout[0] != 'START TRANSACTION;' or cltout[1] !=
'SET SCHEMA "sys";' or cltout[2] != 'COMMIT;':
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.py
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.py
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.py
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.py
@@ -75,7 +75,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(f) as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
if len(cltout) != 3 or cltout[0] != 'START TRANSACTION;' or cltout[1] !=
'SET SCHEMA "sys";' or cltout[2] != 'COMMIT;':
diff --git a/sql/test/emptydb-upgrade-hge/Tests/upgrade.py
b/sql/test/emptydb-upgrade-hge/Tests/upgrade.py
--- a/sql/test/emptydb-upgrade-hge/Tests/upgrade.py
+++ b/sql/test/emptydb-upgrade-hge/Tests/upgrade.py
@@ -74,7 +74,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(f) as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
if len(cltout) != 3 or cltout[0] != 'START TRANSACTION;' or cltout[1] !=
'SET SCHEMA "sys";' or cltout[2] != 'COMMIT;':
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.py
b/sql/test/emptydb-upgrade/Tests/upgrade.py
--- a/sql/test/emptydb-upgrade/Tests/upgrade.py
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.py
@@ -75,7 +75,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(f) as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
if len(cltout) != 3 or cltout[0] != 'START TRANSACTION;' or cltout[1] !=
'SET SCHEMA "sys";' or cltout[2] != 'COMMIT;':
diff --git a/sql/test/emptydb/Tests/check.SQL.py
b/sql/test/emptydb/Tests/check.SQL.py
--- a/sql/test/emptydb/Tests/check.SQL.py
+++ b/sql/test/emptydb/Tests/check.SQL.py
@@ -590,7 +590,10 @@ if check:
with open(stableout) as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff([x for x in stable if not
x.startswith('%')], [x for x in output if not x.startswith('%')],
fromfile='test', tofile=stableout):
+ for line in difflib.unified_diff(
+ [x for x in stable if not x.startswith('%')],
+ [x for x in output if not x.startswith('%')],
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
elif approve:
diff --git a/sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.py
b/sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.py
--- a/sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.py
+++ b/sql/test/testdb-previous-upgrade-chain-hge/Tests/upgrade.py
@@ -81,7 +81,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
del stable[i-1:i+4]
break
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
else:
diff --git a/sql/test/testdb-previous-upgrade-chain/Tests/upgrade.py
b/sql/test/testdb-previous-upgrade-chain/Tests/upgrade.py
--- a/sql/test/testdb-previous-upgrade-chain/Tests/upgrade.py
+++ b/sql/test/testdb-previous-upgrade-chain/Tests/upgrade.py
@@ -81,7 +81,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
del stable[i-1:i+4]
break
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
else:
diff --git a/sql/test/testdb-previous-upgrade-hge/Tests/upgrade.py
b/sql/test/testdb-previous-upgrade-hge/Tests/upgrade.py
--- a/sql/test/testdb-previous-upgrade-hge/Tests/upgrade.py
+++ b/sql/test/testdb-previous-upgrade-hge/Tests/upgrade.py
@@ -80,7 +80,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
del stable[i-1:i+4]
break
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
else:
diff --git a/sql/test/testdb-previous-upgrade/Tests/upgrade.py
b/sql/test/testdb-previous-upgrade/Tests/upgrade.py
--- a/sql/test/testdb-previous-upgrade/Tests/upgrade.py
+++ b/sql/test/testdb-previous-upgrade/Tests/upgrade.py
@@ -81,7 +81,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
del stable[i-1:i+4]
break
import difflib
- for line in difflib.unified_diff(stable, srvout, fromfile='test',
tofile=f):
+ for line in difflib.unified_diff(stable, srvout,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
xit = 1
else:
diff --git a/sql/test/testdb-reload/Tests/reload.py
b/sql/test/testdb-reload/Tests/reload.py
--- a/sql/test/testdb-reload/Tests/reload.py
+++ b/sql/test/testdb-reload/Tests/reload.py
@@ -87,7 +87,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(stableout, encoding='utf-8') as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, output, fromfile='test',
tofile=stableout):
+ for line in difflib.unified_diff(stable, output,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
else:
sys.stdout.writelines(d2out)
diff --git a/sql/test/testdb-reload2/Tests/reload.py
b/sql/test/testdb-reload2/Tests/reload.py
--- a/sql/test/testdb-reload2/Tests/reload.py
+++ b/sql/test/testdb-reload2/Tests/reload.py
@@ -87,7 +87,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
with open(stableout, encoding='utf-8') as fil:
stable = fil.readlines()
import difflib
- for line in difflib.unified_diff(stable, output, fromfile='test',
tofile=stableout):
+ for line in difflib.unified_diff(stable, output,
+ fromfile='expected', tofile='received'):
sys.stderr.write(line)
else:
sys.stdout.writelines(d2out)
diff --git a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py
b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py
--- a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py
+++ b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py
@@ -81,7 +81,8 @@ if len(sys.argv) == 2 and sys.argv[1] ==
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]