Changeset: 20a11ee41ee3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=20a11ee41ee3 Added Files: sql/backends/monet5/Tests/rapi16.sql sql/backends/monet5/Tests/rapi16.stable.err sql/backends/monet5/Tests/rapi16.stable.out Removed Files: monetdb5/modules/mal/00_cluster_hge.mal monetdb5/modules/mal/Tests/ascii_io2.load monetdb5/optimizer/Tests/tst4610.mal monetdb5/optimizer/Tests/tst4610.stable.err monetdb5/optimizer/Tests/tst4610.stable.out sql/storage/restrict/restrict_logger.c sql/storage/restrict/restrict_logger.h sql/storage/restrict/restrict_storage.c sql/storage/restrict/restrict_storage.h sql/storage/restrict/restrict_table.c sql/storage/restrict/restrict_table.h Modified Files: clients/R/MonetDB.R/R/mapi.R clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/SQL-dump.stable.out clients/Tests/SQL-dump.stable.out.int128 clients/Tests/exports.stable.out gdk/ChangeLog gdk/gdk.h gdk/gdk_align.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_delta.c gdk/gdk_join_legacy.c gdk/gdk_private.h gdk/gdk_select_legacy.c gdk/gdk_storage.c monetdb5/ChangeLog monetdb5/extras/rapi/Tests/All monetdb5/mal/Tests/dataflow01.mal monetdb5/mal/Tests/dataflow01.stable.out monetdb5/mal/Tests/tst025.stable.out monetdb5/mal/Tests/tst032.stable.out monetdb5/mal/Tests/tst033.mal monetdb5/mal/Tests/tst033.stable.out monetdb5/mal/Tests/tst034.mal monetdb5/mal/Tests/tst034.stable.out monetdb5/mal/Tests/tst201.stable.out monetdb5/mal/Tests/tst220.mal monetdb5/mal/Tests/tst220.stable.out monetdb5/mal/Tests/tst275.stable.out monetdb5/mal/Tests/tst285.mal monetdb5/mal/Tests/tst285.stable.out monetdb5/mal/Tests/tst802.mal monetdb5/mal/Tests/tst802.stable.out monetdb5/mal/Tests/tst810.stable.out monetdb5/mal/Tests/tst903.mal monetdb5/mal/Tests/tst903.stable.out monetdb5/mal/Tests/tst911.mal monetdb5/mal/Tests/tst911.stable.out monetdb5/mal/Tests/tst912.mal monetdb5/mal/Tests/tst912.stable.out monetdb5/mal/mal_parser.c monetdb5/modules/atoms/batxml.c monetdb5/modules/atoms/json.c monetdb5/modules/atoms/mtime.c monetdb5/modules/kernel/algebra.c monetdb5/modules/kernel/algebra.h monetdb5/modules/kernel/algebra.mal monetdb5/modules/kernel/bat5.c monetdb5/modules/kernel/bat5.h monetdb5/modules/kernel/bat5.mal monetdb5/modules/kernel/batmmath.c monetdb5/modules/kernel/batstr.c monetdb5/modules/mal/Makefile.ag monetdb5/modules/mal/Tests/All monetdb5/modules/mal/Tests/ascii_io2.mal monetdb5/modules/mal/Tests/ascii_io2.stable.out monetdb5/modules/mal/Tests/batpartition.stable.out monetdb5/modules/mal/Tests/inspect05.stable.out.int128 monetdb5/modules/mal/Tests/iterator03.stable.out monetdb5/modules/mal/Tests/mapi01.mal monetdb5/modules/mal/Tests/mapi01.stable.out monetdb5/modules/mal/Tests/mapi07.mal monetdb5/modules/mal/Tests/mapi07.stable.out monetdb5/modules/mal/Tests/partition.stable.out monetdb5/modules/mal/Tests/remote12.stable.out monetdb5/modules/mal/Tests/tokenizer00.stable.out monetdb5/modules/mal/bbp.c monetdb5/modules/mal/joinpath.c monetdb5/modules/mal/mal_init.mal monetdb5/modules/mal/mal_io.c monetdb5/modules/mal/mal_io.h monetdb5/modules/mal/mal_io.mal monetdb5/modules/mal/mal_mapi.c monetdb5/modules/mal/manual.c monetdb5/modules/mal/manual.h monetdb5/modules/mal/manual.mal monetdb5/modules/mal/mkey.c monetdb5/modules/mal/pcre.c monetdb5/modules/mal/remote.c monetdb5/modules/mal/remote.mal monetdb5/modules/mal/tokenizer.c monetdb5/modules/mal/transaction.c monetdb5/modules/mal/transaction.mal monetdb5/modules/mal/zorder.c monetdb5/optimizer/Tests/All monetdb5/optimizer/Tests/CXexample.mal monetdb5/optimizer/Tests/CXexample.stable.out monetdb5/optimizer/Tests/FTexample.mal monetdb5/optimizer/Tests/FTexample.stable.out monetdb5/optimizer/Tests/dataflow.mal monetdb5/optimizer/Tests/dataflow.stable.out monetdb5/optimizer/Tests/reorder00.mal monetdb5/optimizer/Tests/reorder00.stable.out monetdb5/optimizer/Tests/tst4000.mal monetdb5/optimizer/Tests/tst4000.stable.out monetdb5/optimizer/Tests/tst4003.mal monetdb5/optimizer/Tests/tst4003.stable.out monetdb5/optimizer/Tests/tst4030.mal monetdb5/optimizer/Tests/tst4030.stable.out monetdb5/optimizer/Tests/tst4700.mal monetdb5/optimizer/Tests/tst4700.stable.out monetdb5/optimizer/opt_mergetable.c monetdb5/optimizer/opt_pipes.c monetdb5/optimizer/opt_prelude.c monetdb5/optimizer/opt_prelude.h monetdb5/optimizer/optimizer.mal monetdb5/scheduler/Tests/memo01.mal monetdb5/scheduler/Tests/memo02.mal monetdb5/scheduler/Tests/memo04.mal monetdb5/scheduler/Tests/sched00.mal monetdb5/scheduler/srvpool.mal monetdb5/tests/gdkTests/Tests/scanselect.mal monetdb5/tests/gdkTests/Tests/scanselect.stable.out sql/backends/monet5/Makefile.ag sql/backends/monet5/Tests/All sql/backends/monet5/UDF/udf.c sql/backends/monet5/gsl/gsl.c sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql.h sql/backends/monet5/sql.mal sql/backends/monet5/sql_bat2time.c sql/backends/monet5/sql_cast.c sql/backends/monet5/sql_cast_impl_down_from_flt.h sql/backends/monet5/sql_cast_impl_down_from_int.h sql/backends/monet5/sql_cast_impl_up_to_flt.h sql/backends/monet5/sql_cast_impl_up_to_int.h sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_round_impl.h sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_statement.h sql/backends/monet5/sql_upgrades.c sql/include/sql_catalog.h sql/scripts/25_debug.sql sql/server/rel_optimizer.c sql/storage/bat/bat_utils.c sql/storage/bat/bat_utils.h sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.stable.err sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.stable.out sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out sql/test/Tests/setoptimizer.stable.err sql/test/Tests/setoptimizer.stable.out sql/test/Tests/setoptimizer.stable.out.Windows sql/test/Tests/systemfunctions.stable.out sql/test/Tests/systemfunctions.stable.out.int128 sql/test/leaks/Tests/check1.stable.out.int128 sql/test/leaks/Tests/check2.stable.out.int128 sql/test/leaks/Tests/check3.stable.out.int128 sql/test/leaks/Tests/check4.stable.out.int128 sql/test/leaks/Tests/check5.stable.out.int128 Branch: leftmart Log Message:
merge with default diffs (truncated from 11197 to 300 lines): diff --git a/clients/R/MonetDB.R/R/mapi.R b/clients/R/MonetDB.R/R/mapi.R --- a/clients/R/MonetDB.R/R/mapi.R +++ b/clients/R/MonetDB.R/R/mapi.R @@ -118,7 +118,7 @@ REPLY_SIZE <- 100 # Apparently, -1 me resp <- c(resp, readChar(con, length, useBytes = TRUE)) if (final == 1) break } - if (getOption("monetdb.debug.mapi", F)) cat(paste("RX: '", substring(paste0(resp, collapse=""), 1, 200), "'\n", sep="")) + if (getOption("monetdb.debug.mapi", F)) message("RX: '", substring(paste0(resp, collapse=""), 1, 200)) return(paste0("", resp, collapse="")) } @@ -128,7 +128,7 @@ REPLY_SIZE <- 100 # Apparently, -1 me stop("I can only be called with a MonetDB connection object as parameter.") final <- FALSE pos <- 0 - if (getOption("monetdb.debug.mapi", F)) message("TX: '", msg, "'\n", sep="") + if (getOption("monetdb.debug.mapi", F)) message("TX: '", msg) # convert to raw byte array, otherwise multibyte characters are 'difficult' msgr <- charToRaw(msg) msglen <- length(msgr) diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -2354,7 +2354,7 @@ command algebra.like(s:str,pat:str):bit address PCRElike2; command algebra.like(s:str,pat:str,esc:str):bit address PCRElike3; -command algebra.like(b:bat[:oid,:str],substr:str):bat[:oid,:str] +command algebra.like(b:bat[:oid,:str],substr:str):bat[:oid,:oid] address ALGlike; comment Selects all elements that have 'substr' as in the tail. @@ -2487,26 +2487,10 @@ command algebra.subsort(b:bat[:oid,:any_ address ALGsubsort11; comment Returns a copy of the BAT sorted on tail values. The input and output are (must be) dense headed. The order is descending if the reverse bit is set. This is a stable sort if the stable bit is set. -command algebra.sample(b:bat[:oid,:any_1],num:int):bat[:oid,:oid] -address ALGsample; -comment Returns the oids of a random selection of size 'num' from the input BAT. - command algebra.selectNotNil(b:bat[:oid,:any_2]):bat[:oid,:any_2] address ALGselectNotNil; comment Select all not-nil values -command algebra.select(b:bat[:oid,:any_2],value:any_2):bat[:oid,:any_2] -address ALGselect1; -comment Select all BUNs of a BAT with a certain tail value. Selection on NIL is also possible (it should be properly casted, e.g.:int(nil)). - -command algebra.select(b:bat[:oid,:any_2],low:any_2,high:any_2,li:bit,hi:bit):bat[:oid,:any_2] -address ALGselectInclusive; -comment Select all BUNs that have tail values: {v| low <{=} v <{=} high}. Boundary inclusion is indicated separately. NIL boundary values have a special meaning. + low == nil means: no lower bound + high == nil means: no upper bound. - -command algebra.select(b:bat[:oid,:any_2],low:any_2,high:any_2):bat[:oid,:any_2] -address ALGselect; -comment Select all BUNs that have tail values: {v| low <= v <= high}. NIL boundary values have a special meaning. + low == nil means: no lower bound + high == nil means: no upper bound. NOTE 1: you should cast the nil to the appropriate type, e.g. int(nil) in order to circumvent type clashes. NOTE 2: as the 'nil' element has no clear place in the ordered domain of values, tuples with 'nil' values are NEVER returned by the range select. - command algebra.subselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],low:any_1,high:any_1,li:bit,hi:bit,anti:bit):bat[:oid,:oid] address ALGsubselect2; comment 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 function. @@ -31175,18 +31159,18 @@ command bat.densebat(sz:wrd):bat[:oid,:o address BKCdensebat; comment Creates a new [void,void] BAT of size 'sz'. +command bat.delete(b:bat[:oid,:any_1]):bat[:oid,:any_1] +address BKCdelete_all; +comment Delete all entries. + +command bat.delete(b:bat[:oid,:any_1],h:oid):bat[:oid,:any_1] +address BKCdelete; +comment Delete an entry with a certain head value. + command bat.delete(b:bat[:oid,:any_1],src:bat[:oid,:any_1]):bat[:oid,:any_1] address BKCdelete_bat_bun; comment Delete from the first BAT all BUNs with a corresponding BUN in the second. -command bat.delete(b:bat[:oid,:any_1]):bat[:oid,:any_1] -address BKCdelete_all; -comment Delete all BUNs in a BAT. - -command bat.delete(b:bat[:oid,:any_1],h:oid):bat[:oid,:any_1] -address BKCdelete; -comment Delete all BUNs with a certain head value. - command bat.getName(b:bat[:oid,:any_1]):str address BKCgetBBPname; comment Gives back the logical name of a BAT. @@ -38435,10 +38419,6 @@ pattern io.printf(fmt:str,val:any...):vo address IOprintf; comment Select default format -pattern io.prompt(val:any_1):void -address IOprompt_val; -comment Print a MAL value without brackets. - pattern io.print(val:bat[:oid,:any_1]):void address IOprint_val; comment Print a MAL value column . @@ -38919,22 +38899,14 @@ command mapi.trace(mid:int,flag:int):voi address SERVERtrace; comment Toggle the Mapi library debug tracer. -pattern manual.completion(pat:str):void -address MANUALcompletion; -comment Produces the wordcompletion table. +pattern manual.functions() (sig:bat[:oid,:str],adr:bat[:oid,:str],com:bat[:oid,:str]) +address MANUALcreateOverview; +comment Produces a table with all MAL functions known pattern manual.help(text:str):void address MANUALhelp; comment Produces a list of all <module>.<function> that match the text pattern. The wildcard '*' can be used for <module>and <function>. Using the '(' asks for signature information andusing ')' asks for the complete help record. -pattern manual.summary():void -address MANUALcreateSummary; -comment Produces a manual summary with help lines grouped by module. - -pattern manual.search(text:str):void -address MANUALsearch; -comment Search the manual for command descriptions that match theregular expression 'text' - pattern mat.hasMoreElements(grp:bat[:oid,:any_2]...):bat[:oid,:any_2] address MAThasMoreElements; comment Find the next element in the merge table @@ -40331,22 +40303,6 @@ command sabaoth.retreatScenario(lang:str address SABretreatScenario; comment Unpublishes the given language as available for this server -pattern scheduler.costPrediction(a:any):lng -address RUNcostPrediction; -comment A sample cost prediction function - -pattern scheduler.choice(arg:any...):void -address RUNchoice; -comment Select the next step in a query memo plan - -pattern scheduler.choice():void -address RUNchoice; -comment Select the next step in a query memo plan - -pattern scheduler.isolation():void -address RUNisolation; -comment Run a private copy of the MAL program - pattern scheduler.peers(N:int):void address SRVsetServers; comment Simulate N peers @@ -40355,18 +40311,10 @@ pattern scheduler.pattern(pat:str):void address SRVsetServers; comment Activate the peers matching the pattern and return number found. -pattern scheduler.pick(arg:any_1...):any_1 -address RUNpickResult; -comment Pick up the first result - pattern scheduler.srvpool():int address SRVPOOLscheduler; comment Run a program block in parallel. -pattern scheduler.volumeCost(a:any):lng -address RUNvolumeCost; -comment A sample cost function based on materialized results - function sphinx.sphinx_searchIndexLimit(q:str,i:str,l:int):bat[:oid,:lng]; function sphinx.sphinx_searchIndex(q:str,i:str):bat[:oid,:lng]; function sphinx.sphinx_search(q:str):bat[:oid,:lng]; @@ -40742,6 +40690,10 @@ pattern sql.password(user:str):str address db_password_wrap; comment Return password hash of user +command sql.project(col:bat[:oid,:oid],l:bat[:oid,:oid],r:bat[:oid,:oid]):bat[:oid,:oid] +address BATleftproject; +comment Last step of a left outer join, ie project the inner join (l,r) over the left input side (col) + command sql.projectdelta(subselect:bat[:oid,:oid],col:bat[:oid,:any_3],uid:bat[:oid,:oid],uval:bat[:oid,:any_3]):bat[:oid,:any_3] address DELTAproject2; comment Return column bat with delta's applied. diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -2865,7 +2865,7 @@ command algebra.like(s:str,pat:str):bit address PCRElike2; command algebra.like(s:str,pat:str,esc:str):bit address PCRElike3; -command algebra.like(b:bat[:oid,:str],substr:str):bat[:oid,:str] +command algebra.like(b:bat[:oid,:str],substr:str):bat[:oid,:oid] address ALGlike; comment Selects all elements that have 'substr' as in the tail. @@ -2998,26 +2998,10 @@ command algebra.subsort(b:bat[:oid,:any_ address ALGsubsort11; comment Returns a copy of the BAT sorted on tail values. The input and output are (must be) dense headed. The order is descending if the reverse bit is set. This is a stable sort if the stable bit is set. -command algebra.sample(b:bat[:oid,:any_1],num:int):bat[:oid,:oid] -address ALGsample; -comment Returns the oids of a random selection of size 'num' from the input BAT. - command algebra.selectNotNil(b:bat[:oid,:any_2]):bat[:oid,:any_2] address ALGselectNotNil; comment Select all not-nil values -command algebra.select(b:bat[:oid,:any_2],value:any_2):bat[:oid,:any_2] -address ALGselect1; -comment Select all BUNs of a BAT with a certain tail value. Selection on NIL is also possible (it should be properly casted, e.g.:int(nil)). - -command algebra.select(b:bat[:oid,:any_2],low:any_2,high:any_2,li:bit,hi:bit):bat[:oid,:any_2] -address ALGselectInclusive; -comment Select all BUNs that have tail values: {v| low <{=} v <{=} high}. Boundary inclusion is indicated separately. NIL boundary values have a special meaning. + low == nil means: no lower bound + high == nil means: no upper bound. - -command algebra.select(b:bat[:oid,:any_2],low:any_2,high:any_2):bat[:oid,:any_2] -address ALGselect; -comment Select all BUNs that have tail values: {v| low <= v <= high}. NIL boundary values have a special meaning. + low == nil means: no lower bound + high == nil means: no upper bound. NOTE 1: you should cast the nil to the appropriate type, e.g. int(nil) in order to circumvent type clashes. NOTE 2: as the 'nil' element has no clear place in the ordered domain of values, tuples with 'nil' values are NEVER returned by the range select. - command algebra.subselect(b:bat[:oid,:any_1],s:bat[:oid,:oid],low:any_1,high:any_1,li:bit,hi:bit,anti:bit):bat[:oid,:oid] address ALGsubselect2; comment 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 function. @@ -40216,18 +40200,18 @@ command bat.densebat(sz:wrd):bat[:oid,:o address BKCdensebat; comment Creates a new [void,void] BAT of size 'sz'. +command bat.delete(b:bat[:oid,:any_1]):bat[:oid,:any_1] +address BKCdelete_all; +comment Delete all entries. + +command bat.delete(b:bat[:oid,:any_1],h:oid):bat[:oid,:any_1] +address BKCdelete; +comment Delete an entry with a certain head value. + command bat.delete(b:bat[:oid,:any_1],src:bat[:oid,:any_1]):bat[:oid,:any_1] address BKCdelete_bat_bun; comment Delete from the first BAT all BUNs with a corresponding BUN in the second. -command bat.delete(b:bat[:oid,:any_1]):bat[:oid,:any_1] -address BKCdelete_all; -comment Delete all BUNs in a BAT. - -command bat.delete(b:bat[:oid,:any_1],h:oid):bat[:oid,:any_1] -address BKCdelete; -comment Delete all BUNs with a certain head value. - command bat.getName(b:bat[:oid,:any_1]):str address BKCgetBBPname; comment Gives back the logical name of a BAT. @@ -48438,10 +48422,6 @@ command calc.xml(src:xml):xml address XMLxml2xml; command calc.xml(src:str):xml address XMLstr2xml; -command cluster.new(b:bat[:oid,:hge],bits:int,offset:int,order:bit) (psum:bat[:oid,:wrd],map:bat[:oid,:bte]) -address CLS_create2_hge; -command cluster.new(b:bat[:oid,:hge],bits:int,offset:int) (psum:bat[:oid,:wrd],map:bat[:oid,:wrd]) -address CLS_create_hge; pattern clients.addUser(nme:str,pw:str):oid address CLTaddUser; comment Allow user with password access to the given scenarios @@ -49354,10 +49334,6 @@ pattern io.printf(fmt:str,val:any...):vo address IOprintf; comment Select default format -pattern io.prompt(val:any_1):void -address IOprompt_val; -comment Print a MAL value without brackets. - pattern io.print(val:bat[:oid,:any_1]):void address IOprint_val; comment Print a MAL value column . @@ -49850,22 +49826,14 @@ command mapi.trace(mid:int,flag:int):voi address SERVERtrace; comment Toggle the Mapi library debug tracer. -pattern manual.completion(pat:str):void -address MANUALcompletion; -comment Produces the wordcompletion table. +pattern manual.functions() (sig:bat[:oid,:str],adr:bat[:oid,:str],com:bat[:oid,:str]) +address MANUALcreateOverview; +comment Produces a table with all MAL functions known pattern manual.help(text:str):void address MANUALhelp; comment Produces a list of all <module>.<function> that match the text pattern. The wildcard '*' can be used for <module>and <function>. Using the '(' asks for signature information andusing ')' asks for the complete help record. -pattern manual.summary():void -address MANUALcreateSummary; -comment Produces a manual summary with help lines grouped by module. - -pattern manual.search(text:str):void -address MANUALsearch; -comment Search the manual for command descriptions that match theregular expression 'text' - pattern mat.hasMoreElements(grp:bat[:oid,:any_2]...):bat[:oid,:any_2] address MAThasMoreElements; comment Find the next element in the merge table @@ -51266,22 +51234,6 @@ command sabaoth.retreatScenario(lang:str address SABretreatScenario; comment Unpublishes the given language as available for this server -pattern scheduler.costPrediction(a:any):lng -address RUNcostPrediction; -comment A sample cost prediction function - -pattern scheduler.choice(arg:any...):void _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list