Changeset: 7098696543c4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7098696543c4
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
monetdb5/modules/mal/pp_hash.c
sql/backends/monet5/rel_physical.c
sql/backends/monet5/rel_pphash.c
sql/backends/monet5/sql_pp_statement.c
sql/backends/monet5/sql_pp_statement.h
sql/server/rel_unnest.c
Branch: manti
Log Message:
merged from default
diffs (truncated from 1249 to 300 lines):
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -46,7 +46,9 @@ jobs:
if: runner.os == 'macOS'
- name: install packages
- run: sudo apt-get install -y bison libbz2-dev libpcre2-dev liblzma-dev
liblz4-dev libxml2-dev pkg-config libxxhash-dev unixodbc-dev zlib1g-dev
libssl-dev
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y bison libbz2-dev libpcre2-dev liblzma-dev
liblz4-dev libxml2-dev pkg-config libxxhash-dev unixodbc-dev zlib1g-dev
libssl-dev
if: runner.os == 'Linux'
- name: Patch /etc/hosts on Unix
diff --git a/ChangeLog.Dec2025 b/ChangeLog.Dec2025
--- a/ChangeLog.Dec2025
+++ b/ChangeLog.Dec2025
@@ -1,3 +1,7 @@
# ChangeLog file for devel
# This file is updated with Maddlog
+* Fri Oct 23 2026 Sjoerd Mullender <[email protected]>
+- Added an option --relative-dir to mclient to specify the directory
+ for relative path names when using the ON CLIENT option in SQL queries.
+
diff --git a/clients/Tests/MAL-signatures-hge.test
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -729,6 +729,7 @@ algebra select command algebra.select(X_
algebra select command algebra.select(X_0:bat[:any_1], X_1:any_1,
X_2:any_1, X_3:bit, X_4:bit, X_5:bit, X_6:bit):bat[:oid] ALGselect1nil
With unknown set, each nil != nil
algebra select command algebra.select(X_0:bat[:any_1], X_1:bat[:oid],
X_2:any_1, X_3:any_1, X_4:bit, X_5:bit, X_6:bit):bat[:oid] ALGselect2
Select all head values of the first input BAT for which the tail value is in
range and for which the head value occurs in the tail of the second input BAT.
The first input is a dense-headed BAT, the second input is a dense-headed BAT
with sorted tail, output is a dense-headed BAT with in the tail the head value
of the input BAT for which the tail value is between the values low and high
(inclusive if li respectively hi is set). The output BAT is sorted on the tail
value. If low or high is nil, the boundary is not considered (effectively -
and + infinity). If anti is set, the result is the complement. Nil values in
the tail are never matched, unless low=nil, high=nil, li=1, hi=1, anti=0. All
non-nil values are returned if low=nil, high=nil, and li, hi are not both 1, or
anti=1. Note that the output is suitable as second input for this functi
on.
algebra select command algebra.select(X_0:bat[:any_1], X_1:bat[:oid],
X_2:any_1, X_3:any_1, X_4:bit, X_5:bit, X_6:bit, X_7:bit):bat[:oid]
ALGselect2nil With unknown set, each nil != nil
+algebra selectNotFalse command algebra.selectNotFalse(X_0:bat[:oid],
X_1:bat[:bit], X_2:bat[:bit], X_3:bit) (X_4:bat[:oid], X_5:bat[:bit])
ALGselectNotFalse Return (gid, mark&&pred), if mark&&pred != FALSE. If
'aggr', group on gid, return aggregated (gid, mark&&pred)
algebra selectNotNil command
algebra.selectNotNil(X_0:bat[:any_1]):bat[:any_1] ALGselectNotNil Select
all not-nil values
algebra semijoin command algebra.semijoin(X_0:bat[:any_1],
X_1:bat[:any_1], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:bit, X_6:lng)
(X_7:bat[:oid], X_8:bat[:oid]) ALGsemijoin Semi join with candidate
lists
algebra single command algebra.single(X_0:bat[:oid],
X_1:bat[:oid]):bat[:oid] ALGsingle Check for single result ids.
@@ -9681,7 +9682,8 @@ iaggr sum command iaggr.sum(X_0:bat[:flt
iaggr sum command iaggr.sum(X_0:bat[:dbl], X_1:bit) (X_2:dbl, X_3:dbl,
X_4:lng) IALGfsum_skipnil Return the Kahan/Neumaier summation or nil.
iaggr sum command iaggr.sum(X_0:bat[:flt], X_1:bit) (X_2:dbl, X_3:dbl,
X_4:lng) IALGfsum_skipnil Return the Kahan/Neumaier summation or nil.
iaggr sum command iaggr.sum(X_0:bat[:flt], X_1:bit) (X_2:flt, X_3:flt,
X_4:lng) IALGfsum_skipnil_flt Return the Kahan/Neumaier summation or nil.
-ialgebra matched command ialgebra.matched(X_0:bat[:bit],
X_1:bat[:oid]):bat[:oid] OAHASHmatched Mark matched rows, only return
rows matched rows on first match.
+ialgebra matched unsafe command ialgebra.matched(X_0:bat[:bit],
X_1:bat[:bit], X_2:bat[:oid]):bat[:oid] OAHASHmark_nils Mark rows (nil no
value, 1 nil, 0 rest), return rows.
+ialgebra matched unsafe command ialgebra.matched(X_0:bat[:bit],
X_1:bat[:oid]):bat[:oid] OAHASHmatched Mark matched rows, only return rows
matched rows on first match.
ialgebra project pattern ialgebra.project(X_0:bat[:oid],
X_1:any_1):bat[:any_1] LALGconstant Project a single value
ialgebra projection command ialgebra.projection(X_0:bat[:oid],
X_1:bat[:any_1]):bat[:any_1] LALGprojection Project.
ialgebra unique command ialgebra.unique(X_0:bat[:any_1], X_1:bat[:oid],
X_2:bat[:oid], X_3:bit) (X_4:bat[:oid], X_5:bat[:any_1])
LALGgroup_unique Unique rows per group.
@@ -10105,7 +10107,9 @@ oahash combined_oprobe command oahash.co
oahash combined_oprobe command oahash.combined_oprobe(X_0:bat[:any_1],
X_1:bat[:oid], X_2:bat[:oid], X_3:bat[:any_1], X_4:bat[:lng], X_5:bit, X_6:bit)
(X_7:bat[:oid], X_8:bat[:oid], X_9:bat[:bit]) OAHASHoprobe_cmbd_single
Probe the selected `key`-s in the hash table. For a matched item, return its
OID in the 'key' column and the slot ID in the hash table
oahash combined_probe command oahash.combined_probe(X_0:bat[:any_1],
X_1:bat[:oid], X_2:bat[:oid], X_3:bat[:any_1], X_4:bit, X_5:bit)
(X_6:bat[:oid], X_7:bat[:oid]) OAHASHprobe_cmbd Probe the selected
`key`-s in the hash table. For a matched item, return its OID in the 'key'
column and the slot ID in the hash table
oahash combined_probe command oahash.combined_probe(X_0:bat[:any_1],
X_1:bat[:oid], X_2:bat[:oid], X_3:bat[:any_1], X_4:bat[:lng], X_5:bit, X_6:bit)
(X_7:bat[:oid], X_8:bat[:oid]) OAHASHprobe_cmbd_single Probe the selected
`key`-s in the hash table. For a matched item, return its OID in the 'key'
column and the slot ID in the hash table
+oahash empty command oahash.empty(X_0:bat[:any_1]):bit OAHASHempty
Hash empty.
oahash expand pattern oahash.expand(X_0:bat[:oid], X_1:bat[:oid],
X_2:bat[:lng], X_3:bit):bat[:oid] OAHASHexpand Expand the probe-side OIDs
according to their matching hash-side GIDs and frequencies. If 'leftouter' is
true, include the not matched OIDs
+oahash expand pattern oahash.expand(X_0:bat[:oid], X_1:bat[:oid],
X_2:bat[:bit], X_3:bat[:any], X_4:bat[:lng]) (X_5:bat[:oid], X_6:bat[:oid],
X_7:bat[:bit]) OAHASHexpand3 Expand the probe-side OIDs, hash-side GIDs and
the marks where NULL matches all
oahash expand_cartesian command
oahash.expand_cartesian(X_0:bat[:any_1], X_1:bat[:any_2], X_2:bit):bat[:oid]
OAHASHexpand_cart Duplicate each value in 'col' the number of times as
the count of 'rowrepeat'. For a left/right-outer join, if 'rowrepeat' is empty,
output the values in 'col' once.
oahash explode command oahash.explode(X_0:bat[:oid], X_1:bat[:lng],
X_2:bat[:any_2], X_3:bit):bat[:oid] OAHASHexplode Explode the result
vector 'frequency' times and return payload heap slot ids. If 'left_outer' is
true, fill the not 'selected' slot with oid_nil
oahash explode_cartesian command
oahash.explode_cartesian(X_0:bat[:any_1], X_1:bat[:2], X_2:bit):bat[:oid]
OAHASHexplode_cart Duplicate the whole 'col' the number of times as the
count of 'setrepeat'. For a left/right-ourter join, if 'col' is empty, output
NULLs.
@@ -10114,8 +10118,8 @@ oahash frequency pattern oahash.frequenc
oahash frequency pattern oahash.frequency(X_0:bat[:oid]):bat[:lng]
OAHASHadd_freq Add `slot_id` to the shared `frequencies` BAT. Returns the
updated `frequencies`
oahash hash pattern oahash.hash(X_0:any_1):lng OAHASHhash Compute
hash.
oahash hashmark_init command oahash.hashmark_init(X_0:bat[:any_1],
X_1:bat[:any_2]):bat[:bit] OAHASHhashmark_init (empty)
-oahash mprobe command oahash.mprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bit, X_3:bit) (X_4:bat[:oid], X_5:bat[:oid], X_6:bat[:bit]) OAHASHmprobe
Probe the `key`-s in the hash table. For a matched key, return its OID in the
'key' column and the slot ID in the hash table
-oahash mprobe command oahash.mprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bat[:lng], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid], X_7:bat[:bit])
OAHASHmprobe_single Probe the `key`-s in the hash table. For a matched key,
return its OID in the 'key' column and the slot ID in the hash table
+oahash mprobe command oahash.mprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bit, X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid], X_7:bat[:bit])
OAHASHmprobe Probe the `key`-s in the hash table. For a matched key, return
its OID in the 'key' column and the slot ID in the hash table
+oahash mprobe command oahash.mprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bat[:lng], X_3:bit, X_4:bit, X_5:bit) (X_6:bat[:oid], X_7:bat[:oid],
X_8:bat[:bit]) OAHASHmprobe_single Probe the `key`-s in the hash table. For
a matched key, return its OID in the 'key' column and the slot ID in the hash
table
oahash new pattern oahash.new(X_0:any_1, X_1:lng):bat[:any_1]
OAHASHnew (empty)
oahash new pattern oahash.new(X_0:any_1, X_1:lng,
X_2:bat[:any_2]):bat[:any_1] OAHASHnew (empty)
oahash new pattern oahash.new(X_0:any_1, X_1:lng, X_2:bat[:any_2],
X_3:int):bat[:any_1] OAHASHnew (empty)
@@ -10128,6 +10132,7 @@ oahash oprobe command oahash.oprobe(X_0:
oahash oprobe command oahash.oprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bat[:lng], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid], X_7:bat[:bit])
OAHASHoprobe_single Probe the `key`-s in the hash table. For a matched key,
return its OID in the 'key' column and the slot ID in the hash table
oahash probe command oahash.probe(X_0:bat[:any_1], X_1:bat[:any_1], X_2:bit,
X_3:bit) (X_4:bat[:oid], X_5:bat[:oid]) OAHASHprobe Probe the `key` in the
hash table. For a matched key, return its OID in the 'key' column and the slot
ID in the hash table
oahash probe command oahash.probe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bat[:lng], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid])
OAHASHprobe_single Probe the `key`-s in the hash table. For a matched key,
return its OID in the 'key' column and the slot ID in the hash table
+oahash select_unmatched command oahash.select_unmatched(X_0:bat[:bit],
X_1:lng):bat[:oid] OAHASHselect_unmatched Select unmatched rows, if cnt
== 0 return all.
optimizer aliases pattern optimizer.aliases():str OPTwrapper (empty)
optimizer aliases pattern optimizer.aliases(X_0:str, X_1:str):str
OPTwrapper Alias removal optimizer
optimizer candidates pattern optimizer.candidates():str
OPTwrapper (empty)
diff --git a/clients/Tests/MAL-signatures.test
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -616,6 +616,7 @@ algebra select command algebra.select(X_
algebra select command algebra.select(X_0:bat[:any_1], X_1:any_1,
X_2:any_1, X_3:bit, X_4:bit, X_5:bit, X_6:bit):bat[:oid] ALGselect1nil
With unknown set, each nil != nil
algebra select command algebra.select(X_0:bat[:any_1], X_1:bat[:oid],
X_2:any_1, X_3:any_1, X_4:bit, X_5:bit, X_6:bit):bat[:oid] ALGselect2
Select all head values of the first input BAT for which the tail value is in
range and for which the head value occurs in the tail of the second input BAT.
The first input is a dense-headed BAT, the second input is a dense-headed BAT
with sorted tail, output is a dense-headed BAT with in the tail the head value
of the input BAT for which the tail value is between the values low and high
(inclusive if li respectively hi is set). The output BAT is sorted on the tail
value. If low or high is nil, the boundary is not considered (effectively -
and + infinity). If anti is set, the result is the complement. Nil values in
the tail are never matched, unless low=nil, high=nil, li=1, hi=1, anti=0. All
non-nil values are returned if low=nil, high=nil, and li, hi are not both 1, or
anti=1. Note that the output is suitable as second input for this functi
on.
algebra select command algebra.select(X_0:bat[:any_1], X_1:bat[:oid],
X_2:any_1, X_3:any_1, X_4:bit, X_5:bit, X_6:bit, X_7:bit):bat[:oid]
ALGselect2nil With unknown set, each nil != nil
+algebra selectNotFalse command algebra.selectNotFalse(X_0:bat[:oid],
X_1:bat[:bit], X_2:bat[:bit], X_3:bit) (X_4:bat[:oid], X_5:bat[:bit])
ALGselectNotFalse Return (gid, mark&&pred), if mark&&pred != FALSE. If
'aggr', group on gid, return aggregated (gid, mark&&pred)
algebra selectNotNil command
algebra.selectNotNil(X_0:bat[:any_1]):bat[:any_1] ALGselectNotNil Select
all not-nil values
algebra semijoin command algebra.semijoin(X_0:bat[:any_1],
X_1:bat[:any_1], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:bit, X_6:lng)
(X_7:bat[:oid], X_8:bat[:oid]) ALGsemijoin Semi join with candidate
lists
algebra single command algebra.single(X_0:bat[:oid],
X_1:bat[:oid]):bat[:oid] ALGsingle Check for single result ids.
@@ -7322,7 +7323,8 @@ iaggr sum command iaggr.sum(X_0:bat[:flt
iaggr sum command iaggr.sum(X_0:bat[:dbl], X_1:bit) (X_2:dbl, X_3:dbl,
X_4:lng) IALGfsum_skipnil Return the Kahan/Neumaier summation or nil.
iaggr sum command iaggr.sum(X_0:bat[:flt], X_1:bit) (X_2:dbl, X_3:dbl,
X_4:lng) IALGfsum_skipnil Return the Kahan/Neumaier summation or nil.
iaggr sum command iaggr.sum(X_0:bat[:flt], X_1:bit) (X_2:flt, X_3:flt,
X_4:lng) IALGfsum_skipnil_flt Return the Kahan/Neumaier summation or nil.
-ialgebra matched command ialgebra.matched(X_0:bat[:bit],
X_1:bat[:oid]):bat[:oid] OAHASHmatched Mark matched rows, only return
rows matched rows on first match.
+ialgebra matched unsafe command ialgebra.matched(X_0:bat[:bit],
X_1:bat[:bit], X_2:bat[:oid]):bat[:oid] OAHASHmark_nils Mark rows (nil no
value, 1 nil, 0 rest), return rows.
+ialgebra matched unsafe command ialgebra.matched(X_0:bat[:bit],
X_1:bat[:oid]):bat[:oid] OAHASHmatched Mark matched rows, only return rows
matched rows on first match.
ialgebra project pattern ialgebra.project(X_0:bat[:oid],
X_1:any_1):bat[:any_1] LALGconstant Project a single value
ialgebra projection command ialgebra.projection(X_0:bat[:oid],
X_1:bat[:any_1]):bat[:any_1] LALGprojection Project.
ialgebra unique command ialgebra.unique(X_0:bat[:any_1], X_1:bat[:oid],
X_2:bat[:oid], X_3:bit) (X_4:bat[:oid], X_5:bat[:any_1])
LALGgroup_unique Unique rows per group.
@@ -7742,7 +7744,9 @@ oahash combined_oprobe command oahash.co
oahash combined_oprobe command oahash.combined_oprobe(X_0:bat[:any_1],
X_1:bat[:oid], X_2:bat[:oid], X_3:bat[:any_1], X_4:bat[:lng], X_5:bit, X_6:bit)
(X_7:bat[:oid], X_8:bat[:oid], X_9:bat[:bit]) OAHASHoprobe_cmbd_single
Probe the selected `key`-s in the hash table. For a matched item, return its
OID in the 'key' column and the slot ID in the hash table
oahash combined_probe command oahash.combined_probe(X_0:bat[:any_1],
X_1:bat[:oid], X_2:bat[:oid], X_3:bat[:any_1], X_4:bit, X_5:bit)
(X_6:bat[:oid], X_7:bat[:oid]) OAHASHprobe_cmbd Probe the selected
`key`-s in the hash table. For a matched item, return its OID in the 'key'
column and the slot ID in the hash table
oahash combined_probe command oahash.combined_probe(X_0:bat[:any_1],
X_1:bat[:oid], X_2:bat[:oid], X_3:bat[:any_1], X_4:bat[:lng], X_5:bit, X_6:bit)
(X_7:bat[:oid], X_8:bat[:oid]) OAHASHprobe_cmbd_single Probe the selected
`key`-s in the hash table. For a matched item, return its OID in the 'key'
column and the slot ID in the hash table
+oahash empty command oahash.empty(X_0:bat[:any_1]):bit OAHASHempty
Hash empty.
oahash expand pattern oahash.expand(X_0:bat[:oid], X_1:bat[:oid],
X_2:bat[:lng], X_3:bit):bat[:oid] OAHASHexpand Expand the probe-side OIDs
according to their matching hash-side GIDs and frequencies. If 'leftouter' is
true, include the not matched OIDs
+oahash expand pattern oahash.expand(X_0:bat[:oid], X_1:bat[:oid],
X_2:bat[:bit], X_3:bat[:any], X_4:bat[:lng]) (X_5:bat[:oid], X_6:bat[:oid],
X_7:bat[:bit]) OAHASHexpand3 Expand the probe-side OIDs, hash-side GIDs and
the marks where NULL matches all
oahash expand_cartesian command
oahash.expand_cartesian(X_0:bat[:any_1], X_1:bat[:any_2], X_2:bit):bat[:oid]
OAHASHexpand_cart Duplicate each value in 'col' the number of times as
the count of 'rowrepeat'. For a left/right-outer join, if 'rowrepeat' is empty,
output the values in 'col' once.
oahash explode command oahash.explode(X_0:bat[:oid], X_1:bat[:lng],
X_2:bat[:any_2], X_3:bit):bat[:oid] OAHASHexplode Explode the result
vector 'frequency' times and return payload heap slot ids. If 'left_outer' is
true, fill the not 'selected' slot with oid_nil
oahash explode_cartesian command
oahash.explode_cartesian(X_0:bat[:any_1], X_1:bat[:2], X_2:bit):bat[:oid]
OAHASHexplode_cart Duplicate the whole 'col' the number of times as the
count of 'setrepeat'. For a left/right-ourter join, if 'col' is empty, output
NULLs.
@@ -7751,8 +7755,8 @@ oahash frequency pattern oahash.frequenc
oahash frequency pattern oahash.frequency(X_0:bat[:oid]):bat[:lng]
OAHASHadd_freq Add `slot_id` to the shared `frequencies` BAT. Returns the
updated `frequencies`
oahash hash pattern oahash.hash(X_0:any_1):lng OAHASHhash Compute
hash.
oahash hashmark_init command oahash.hashmark_init(X_0:bat[:any_1],
X_1:bat[:any_2]):bat[:bit] OAHASHhashmark_init (empty)
-oahash mprobe command oahash.mprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bit, X_3:bit) (X_4:bat[:oid], X_5:bat[:oid], X_6:bat[:bit]) OAHASHmprobe
Probe the `key`-s in the hash table. For a matched key, return its OID in the
'key' column and the slot ID in the hash table
-oahash mprobe command oahash.mprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bat[:lng], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid], X_7:bat[:bit])
OAHASHmprobe_single Probe the `key`-s in the hash table. For a matched key,
return its OID in the 'key' column and the slot ID in the hash table
+oahash mprobe command oahash.mprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bit, X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid], X_7:bat[:bit])
OAHASHmprobe Probe the `key`-s in the hash table. For a matched key, return
its OID in the 'key' column and the slot ID in the hash table
+oahash mprobe command oahash.mprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bat[:lng], X_3:bit, X_4:bit, X_5:bit) (X_6:bat[:oid], X_7:bat[:oid],
X_8:bat[:bit]) OAHASHmprobe_single Probe the `key`-s in the hash table. For
a matched key, return its OID in the 'key' column and the slot ID in the hash
table
oahash new pattern oahash.new(X_0:any_1, X_1:lng):bat[:any_1]
OAHASHnew (empty)
oahash new pattern oahash.new(X_0:any_1, X_1:lng,
X_2:bat[:any_2]):bat[:any_1] OAHASHnew (empty)
oahash new pattern oahash.new(X_0:any_1, X_1:lng, X_2:bat[:any_2],
X_3:int):bat[:any_1] OAHASHnew (empty)
@@ -7765,6 +7769,7 @@ oahash oprobe command oahash.oprobe(X_0:
oahash oprobe command oahash.oprobe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bat[:lng], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid], X_7:bat[:bit])
OAHASHoprobe_single Probe the `key`-s in the hash table. For a matched key,
return its OID in the 'key' column and the slot ID in the hash table
oahash probe command oahash.probe(X_0:bat[:any_1], X_1:bat[:any_1], X_2:bit,
X_3:bit) (X_4:bat[:oid], X_5:bat[:oid]) OAHASHprobe Probe the `key` in the
hash table. For a matched key, return its OID in the 'key' column and the slot
ID in the hash table
oahash probe command oahash.probe(X_0:bat[:any_1], X_1:bat[:any_1],
X_2:bat[:lng], X_3:bit, X_4:bit) (X_5:bat[:oid], X_6:bat[:oid])
OAHASHprobe_single Probe the `key`-s in the hash table. For a matched key,
return its OID in the 'key' column and the slot ID in the hash table
+oahash select_unmatched command oahash.select_unmatched(X_0:bat[:bit],
X_1:lng):bat[:oid] OAHASHselect_unmatched Select unmatched rows, if cnt
== 0 return all.
optimizer aliases pattern optimizer.aliases():str OPTwrapper (empty)
optimizer aliases pattern optimizer.aliases(X_0:str, X_1:str):str
OPTwrapper Alias removal optimizer
optimizer candidates pattern optimizer.candidates():str
OPTwrapper (empty)
diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1
--- a/clients/mapiclient/mclient.1
+++ b/clients/mapiclient/mclient.1
@@ -342,6 +342,14 @@ dumping the data of a table.
This option can be used when trying to load data from MonetDB into
another database, or when e.g. JDBC applications are used to reload
the dump.
+.TP
+\fB\-\-relative\-dir=\fP\fIdirectory\fP (\fB\-/\fP \fIdirectory\fP)
+Directory used to find files specified using a relative path name when
+using the \fBON CLIENT\fP option in SQL queries that support them.
+Normally when a file is given as command line argument, such files are
+located relative to the directory of the input file.
+This option overrides that, and also specifies a directory for when
+queries are read from standard input.
.SH BACKSLASH COMMANDS
.SS
General Commands
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -69,6 +69,7 @@ static bool echoquery = false;
static bool errseen = false;
static bool allow_remote = false;
static const char *curfile = NULL;
+static const char *reldir = NULL;
#define setPrompt() snprintf(promptbuf, sizeof(promptbuf), "%.*s>", (int)
sizeof(promptbuf) - 2, language)
#define debugMode() (strncmp(promptbuf, "mdb", 3) == 0)
@@ -3238,7 +3239,13 @@ getfile(void *data, const char *filename
#endif
}
if (f == NULL) {
- if (curfile != NULL) {
+ if (reldir != NULL) {
+ size_t x = strlen(reldir) + strlen(fname) + 2;
+ char *b = malloc(x);
+ snprintf(b, x, "%s/%s", reldir, fname);
+ f = binary ? open_rstream(b) : open_rastream(b);
+ free(b);
+ } else if (curfile != NULL) {
const char *p = strrchr(curfile, '/');
#ifdef _MSC_VER
const char *q = strrchr(curfile, '\\');
@@ -3367,9 +3374,7 @@ putfile(void *data, const char *filename
return NULL; /* success */
}
-static _Noreturn void usage(const char *prog, int xit);
-
-static void
+static _Noreturn void
usage(const char *prog, int xit)
{
mnstr_printf(stderr_stream, "Usage: %s [ options ] [ file or database [
file ... ] ]\n", prog);
@@ -3399,6 +3404,7 @@ usage(const char *prog, int xit)
#ifdef HAVE_POPEN
mnstr_printf(stderr_stream, " -| cmd | --pager=cmd for
pagination\n");
#endif
+ mnstr_printf(stderr_stream, " -/ dir | --relative-dir=dir
directory for relative paths in ON CLIENT\n");
mnstr_printf(stderr_stream, " -v | --version show
version information and exit\n");
mnstr_printf(stderr_stream, " -q | --quiet don't
print welcome message\n");
mnstr_printf(stderr_stream, " -? | --help show
this usage message\n");
@@ -3518,6 +3524,7 @@ main(int argc, char **argv)
{"Xdebug", 0, 0, 'X'},
{"timezone", 0, 0, 'z'},
{"allow-remote", 0, 0, 'R'},
+ {"relative-dir", 1, 0, '/'},
{0, 0, 0, 0}
};
@@ -3596,7 +3603,7 @@ main(int argc, char **argv)
#ifdef HAVE_POPEN
"|:"
#endif
- "?",
+ "/:?",
long_options, &option_index)) != -1) {
switch (c) {
case 0:
@@ -3757,6 +3764,10 @@ main(int argc, char **argv)
pager = optarg;
break;
#endif
+ case '/':
+ assert(optarg);
+ reldir = optarg;
+ break;
case '?':
/* a bit of a hack: look at the option that the
* current `c' is based on and see if we recognize
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -3286,7 +3286,7 @@ log_constant(logger *lg, int type, const
if (LOG_DISABLED(lg) || !nr) {
/* logging is switched off */
- if (lg_updated_set_bit(lg, id, 0) != GDK_SUCCEED)
+ if (!lg->inmemory && lg_updated_set_bit(lg, id, 0) !=
GDK_SUCCEED)
return GDK_FAIL;
if (nr) {
log_lock(lg);
@@ -3394,7 +3394,7 @@ internal_log_bat(logger *lg, BAT *b, log
if (LOG_DISABLED(lg) || !nr) {
/* logging is switched off */
- if (lg_updated_set_bit(lg, id, 0) != GDK_SUCCEED)
+ if (!lg->inmemory && lg_updated_set_bit(lg, id, 0) !=
GDK_SUCCEED)
return GDK_FAIL;
if (nr)
return la_bat_update_count(lg, id, offset + cnt,
lg->tid);
@@ -3629,7 +3629,7 @@ log_delta(logger *lg, BAT *uid, BAT *uva
if (LOG_DISABLED(lg)) {
/* logging is switched off */
- if (lg_updated_set_bit(lg, id, 0) != GDK_SUCCEED)
+ if (!lg->inmemory && lg_updated_set_bit(lg, id, 0) !=
GDK_SUCCEED)
return GDK_FAIL;
log_unlock(lg);
return GDK_SUCCEED;
@@ -3967,7 +3967,7 @@ log_del_bat(logger *lg, log_bid bid)
}
assert(lg->catalog_lid->hseqbase == 0);
- if (lg_updated_set_bit(lg, 0, p) != GDK_SUCCEED)
+ if (!lg->inmemory && lg_updated_set_bit(lg, 0, p) != GDK_SUCCEED)
return GDK_FAIL;
return BUNreplace(lg->catalog_lid, p, &lid, false);
}
diff --git a/gdk/gdk_tracer.c b/gdk/gdk_tracer.c
--- a/gdk/gdk_tracer.c
+++ b/gdk/gdk_tracer.c
@@ -190,8 +190,9 @@ GDKtracer_init_trace_file(const char *db
static gdk_return
_GDKtracer_init_basic_adptr(void)
{
- return GDKtracer_init_trace_file(GDKgetenv("gdk_dbpath"),
- GDKgetenv("gdk_dbtrace"));
+ return GDKtracer_init_trace_file(
+ GDKinmemory(0) ? NULL : GDKgetenv("gdk_dbpath"),
+ GDKgetenv("gdk_dbtrace"));
}
static void
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -433,6 +433,8 @@ size_t GDK_mmap_minsize_transient = MMAP
size_t GDK_mmap_pagesize = MMAP_PAGESIZE; /* mmap granularity */
size_t GDK_mem_maxsize = GDK_VM_MAXSIZE;
size_t GDK_vm_maxsize = GDK_VM_MAXSIZE;
+BUN GDKL3_size = 0;
+
#define SEG_SIZE(x) (((x) + _MT_pagesize - 1) & ~(_MT_pagesize - 1))
@@ -1193,8 +1195,15 @@ GDKinit(opt *set, int setlen, bool embed
#else
GDKL3_size = 16*1024*1024;
#endif
- if ((p = GDKgetenv("gdk_l3_size")) != NULL)
+ if ((p = GDKgetenv("gdk_l3_size")) != NULL) {
GDKL3_size = (BUN) strtoll(p, NULL, 10);
+ } else {
+ snprintf(buf, sizeof(buf), "%zu", GDKL3_size);
+ if (GDKsetenv("gdk_l3_size", buf) != GDK_SUCCEED) {
+ TRC_CRITICAL(GDK, "GDKsetenv gdk_l3_size failed");
+ return GDK_FAIL;
+ }
+ }
if (!GDKinmemory(0)) {
if ((p = GDKgetenv("gdk_dbpath")) != NULL &&
@@ -1288,8 +1297,6 @@ GDKinit(opt *set, int setlen, bool embed
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]