Changeset: 89fa452ceda2 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=89fa452ceda2 Added Files: gdk/gdk_orderidx.c monetdb5/modules/mal/Tests/orderidx00.malC monetdb5/modules/mal/Tests/orderidx00.stable.err monetdb5/modules/mal/Tests/orderidx00.stable.out monetdb5/modules/mal/Tests/orderidx01.malC monetdb5/modules/mal/Tests/orderidx01.stable.err monetdb5/modules/mal/Tests/orderidx01.stable.out monetdb5/modules/mal/Tests/orderidx02.malC monetdb5/modules/mal/Tests/orderidx02.stable.err monetdb5/modules/mal/Tests/orderidx02.stable.out monetdb5/modules/mal/Tests/orderidx04.malC monetdb5/modules/mal/orderidx.c monetdb5/modules/mal/orderidx.h monetdb5/modules/mal/orderidx.mal sql/backends/monet5/sql_orderidx.c sql/backends/monet5/sql_orderidx.h sql/benchmarks/orderindex/experiment.sh sql/benchmarks/tpch/Tests/lowcardinality.sql sql/benchmarks/tpch/Tests/lowcardinality.stable.err sql/benchmarks/tpch/Tests/lowcardinality.stable.out sql/scripts/18_index.sql sql/test/orderidx/Tests/All sql/test/orderidx/Tests/simpletable.sql sql/test/orderidx/Tests/simpletable.stable.err sql/test/orderidx/Tests/simpletable.stable.out sql/test/orderidx/Tests/smalltable.sql sql/test/orderidx/Tests/smalltable.stable.err sql/test/orderidx/Tests/smalltable.stable.out Modified Files: 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/Makefile.ag gdk/gdk.h gdk/gdk_align.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_hash.c gdk/gdk_hash.h gdk/gdk_imprints.c gdk/gdk_join.c gdk/gdk_private.h gdk/gdk_search.c gdk/gdk_select.c gdk/gdk_storage.c geom/monetdb5/geom.c monetdb5/mal/Tests/tst611.malC monetdb5/mal/mal.h monetdb5/mal/mal_errors.h monetdb5/mal/mal_resolve.c monetdb5/modules/mal/Makefile.ag monetdb5/modules/mal/Tests/All monetdb5/modules/mal/Tests/inspect05.stable.out monetdb5/modules/mal/Tests/inspect05.stable.out.int128 monetdb5/modules/mal/Tests/remote03.stable.err monetdb5/modules/mal/mal_init.mal sql/backends/monet5/Makefile.ag sql/backends/monet5/sql.c sql/backends/monet5/sql.h sql/backends/monet5/sql.mal sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_upgrades.c sql/benchmarks/tpch/Tests/All sql/include/sql_catalog.h sql/scripts/75_storagemodel.sql sql/scripts/Makefile.ag sql/server/sql_parser.y sql/server/sql_scan.c sql/storage/bat/bat_storage.c sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.SQL.py sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.stable.err sql/test/BugTracker-2015/Tests/schemadiff.Bug-3778.stable.out sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.stable.out sql/test/BugTracker-2016/Tests/stream_table_crash.Bug-3952.sql sql/test/BugTracker-2016/Tests/stream_table_crash.Bug-3952.stable.err sql/test/BugTracker-2016/Tests/stream_table_crash.Bug-3952.stable.out sql/test/Dependencies/Tests/Dependencies.stable.err sql/test/Dependencies/Tests/Dependencies.stable.out sql/test/Dependencies/Tests/Dependencies.stable.out.int128 sql/test/Tests/median_stdev.stable.out sql/test/Tests/outerref_in_selection.stable.out sql/test/Tests/outerref_in_selection.stable.out.int128 sql/test/Tests/systemfunctions.stable.out sql/test/Tests/systemfunctions.stable.out.int128 sql/test/Users/Tests/copyinto.stable.err sql/test/Users/Tests/dropManyUsers.Bug-3764.stable.out sql/test/Users/Tests/grantMonetdb.stable.err sql/test/leaks/Tests/check0.stable.out sql/test/leaks/Tests/check0.stable.out.int128 sql/test/leaks/Tests/check1.stable.out sql/test/leaks/Tests/check1.stable.out.int128 sql/test/leaks/Tests/check2.stable.out sql/test/leaks/Tests/check2.stable.out.int128 sql/test/leaks/Tests/check3.stable.out sql/test/leaks/Tests/check3.stable.out.int128 sql/test/leaks/Tests/check4.stable.out sql/test/leaks/Tests/check4.stable.out.int128 sql/test/leaks/Tests/check5.stable.out sql/test/leaks/Tests/check5.stable.out.int128 sql/test/leaks/Tests/drop3.stable.out sql/test/leaks/Tests/drop3.stable.out.int128 sql/test/leaks/Tests/select1.stable.out sql/test/leaks/Tests/select1.stable.out.int128 sql/test/leaks/Tests/select2.stable.out sql/test/leaks/Tests/select2.stable.out.int128 sql/test/leaks/Tests/temp1.stable.out sql/test/leaks/Tests/temp1.stable.out.int128 sql/test/leaks/Tests/temp2.stable.out sql/test/leaks/Tests/temp2.stable.out.int128 sql/test/leaks/Tests/temp3.stable.out sql/test/leaks/Tests/temp3.stable.out.int128 tools/mserver/mserver5.c Branch: iot Log Message:
Merge with default. diffs (truncated from 5313 to 300 lines): 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 @@ -2428,6 +2428,10 @@ command algebra.not_like(s:str,pat:str): address PCREnotlike2; command algebra.not_like(s:str,pat:str,esc:str):bit address PCREnotlike3; +command algebra.orderidx(bv:bat[:any_1],stable:bit):bat[:any_1] +address OIDXorderidx; +comment Create an order index + pattern algebra.projectionpath(l:bat[:any]...):bat[:any] address ALGprojectionpath; comment Routine to handle join paths. The type analysis is rather tricky. @@ -39939,6 +39943,10 @@ command bat.delete(b:bat[:any_1],h:oid): address BKCdelete; comment Delete BUN indicated by head value, exchanging with last BUN +pattern bat.getorderidx(bv:bat[:any_1]):bat[:oid] +address OIDXgetorderidx; +comment Return the order index if it exists + command bat.getName(b:bat[:any_1]):str address BKCgetBBPname; comment Gives back the logical name of a BAT. @@ -39967,6 +39975,10 @@ command bat.getSize(b:bat[:any_1]):lng address BKCgetSize; comment Calculate the actual size of the BAT descriptor, heaps, hashes and imprint indices in bytes rounded to the memory page size (see bbp.getPageSize()). +pattern bat.hasorderidx(bv:bat[:any_1]):bit +address OIDXhasorderidx; +comment Return true if order index exists + command bat.imprintsize(b:bat[:hge]):lng address CMDBATimprintsize; command bat.imprints(b:bat[:hge]):void @@ -39974,7 +39986,6 @@ address CMDBATimprints; command bat.imprintsize(b:bat[:dbl]):lng address CMDBATimprintsize; comment Return the storage size of the imprints index structure. - command bat.imprintsize(b:bat[:flt]):lng address CMDBATimprintsize; command bat.imprintsize(b:bat[:lng]):lng @@ -40063,6 +40074,18 @@ pattern bat.new(tt:any_1,size:int):bat[: address CMDBATnewColumn; pattern bat.new(tt:any_1):bat[:any_1] address CMDBATnewColumn; +pattern bat.orderidx(bv:bat[:any_1],l:bat[:any_1]...):void +address OIDXmerge; +comment Consolidates the OID index arrangement + +pattern bat.orderidx(bv:bat[:any_1],pieces:int):void +address OIDXcreate; +comment Introduces the OID index arrangement of ordered values + +pattern bat.orderidx(bv:bat[:any_1]):void +address OIDXcreate; +comment Introduces the OID index arrangement of ordered values + pattern bat.partition(b:bat[:any_1],pieces:int,n:int):bat[:any_1] address CMDBATpartition2; comment Create the n-th slice over the BAT broken into several pieces. @@ -51056,10 +51079,18 @@ command profiler.setheartbeat(b:int):voi address CMDsetHeartbeat; comment Set heart beat performance tracing +command profiler.stoptrace(path:str):void +address CMDstopTracePath; +comment Stop collecting trace information + command profiler.stoptrace():void address CMDstopTrace; comment Stop collecting trace information +command profiler.starttrace(path:str):void +address CMDstartTracePath; +comment Start collecting trace information and keep around in 'path' directory + command profiler.starttrace():void address CMDstartTrace; comment Start collecting trace information @@ -51072,6 +51103,10 @@ pattern profiler.start():void address CMDstartProfiler; comment Start offline performance profiling +pattern querylog.append(q:str,pipe:str,usr:str,tick:timestamp):void +address QLOGappend; +comment Add a new query call to the query log + pattern querylog.call(tick1:timestamp,tick2:timestamp,arg:str,tuples:wrd,xtime:lng,rtime:lng,cpu:int,iowait:int):void address QLOGcall; comment Add a new query call to the query log @@ -51096,10 +51131,6 @@ command querylog.enable(threshold:int):v address QLOGenableThreshold; comment Turn on the query logger -pattern querylog.insert(q:str,pipe:str,usr:str,tick:timestamp):void -address QLOGinsert; -comment Add a new query call to the query log - command querylog.isset():int address QLOGissetFcn; comment Return status of query logger @@ -51390,6 +51421,10 @@ pattern sql.copy_rejects_clear():void address COPYrejects_clear; pattern sql.copy_rejects() (rowid:bat[:lng],fldid:bat[:int],msg:bat[:str],inp:bat[:str]) address COPYrejects; +pattern sql.createorderindex(sch:str,tbl:str,col:str):void +address sql_createorderindex; +comment Instantiate the order index on a column + pattern sql.copy_from(t:ptr,sep:str,rsep:str,ssep:str,ns:str,fname:str,nr:lng,offset:lng,locked:int,best:int):bat[:any]... address mvc_import_table_wrap; comment Import a table from bstream s with the given tuple and seperators (sep/rsep) @@ -51518,6 +51553,10 @@ command sql.dec_round(v:bte,r:bte):bte address bte_dec_round_wrap; comment round off the value v to nearests multiple of r +pattern sql.droporderindex(sch:str,tbl:str,col:str):void +address sql_droporderindex; +comment Drop the order index on a column + pattern sql.dump_trace() (event:bat[:int],clk:bat[:str],pc:bat[:str],thread:bat[:int],ticks:bat[:lng],rssMB:bat[:lng],vmMB:bat[:lng],reads:bat[:lng],writes:bat[:lng],minflt:bat[:lng],majflt:bat[:lng],nvcsw:bat[:lng],stmt:bat[:str]) address dump_trace; comment dump the trace statistics @@ -51785,19 +51824,19 @@ pattern sql.sysmon_pause(tag:sht):void address SYSMONpause; pattern sql.sysmon_queue() (qtag:bat[:lng],user:bat[:str],started:bat[:timestamp],estimate:bat[:timestamp],progress:bat[:int],status:bat[:str],tag:bat[:oid],query:bat[:str]) address SYSMONqueue; -pattern sql.storage(sname:str,tname:str,cname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit]) +pattern sql.storage(sname:str,tname:str,cname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit],orderidx:bat[:lng]) address sql_storage; comment return a table with storage information for a particular column -pattern sql.storage(sname:str,tname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit]) +pattern sql.storage(sname:str,tname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit],orderidx:bat[:lng]) address sql_storage; comment return a table with storage information for a particular table -pattern sql.storage(sname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit]) +pattern sql.storage(sname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit],orderidx:bat[:lng]) address sql_storage; comment return a table with storage information for a particular schema -pattern sql.storage() (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit]) +pattern sql.storage() (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit],orderidx:bat[:lng]) address sql_storage; comment return a table with storage information 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 @@ -2428,6 +2428,10 @@ command algebra.not_like(s:str,pat:str): address PCREnotlike2; command algebra.not_like(s:str,pat:str,esc:str):bit address PCREnotlike3; +command algebra.orderidx(bv:bat[:any_1],stable:bit):bat[:any_1] +address OIDXorderidx; +comment Create an order index + pattern algebra.projectionpath(l:bat[:any]...):bat[:any] address ALGprojectionpath; comment Routine to handle join paths. The type analysis is rather tricky. @@ -39939,6 +39943,10 @@ command bat.delete(b:bat[:any_1],h:oid): address BKCdelete; comment Delete BUN indicated by head value, exchanging with last BUN +pattern bat.getorderidx(bv:bat[:any_1]):bat[:oid] +address OIDXgetorderidx; +comment Return the order index if it exists + command bat.getName(b:bat[:any_1]):str address BKCgetBBPname; comment Gives back the logical name of a BAT. @@ -39967,6 +39975,10 @@ command bat.getSize(b:bat[:any_1]):lng address BKCgetSize; comment Calculate the actual size of the BAT descriptor, heaps, hashes and imprint indices in bytes rounded to the memory page size (see bbp.getPageSize()). +pattern bat.hasorderidx(bv:bat[:any_1]):bit +address OIDXhasorderidx; +comment Return true if order index exists + command bat.imprintsize(b:bat[:hge]):lng address CMDBATimprintsize; command bat.imprints(b:bat[:hge]):void @@ -40063,6 +40075,18 @@ pattern bat.new(tt:any_1,size:int):bat[: address CMDBATnewColumn; pattern bat.new(tt:any_1):bat[:any_1] address CMDBATnewColumn; +pattern bat.orderidx(bv:bat[:any_1],l:bat[:any_1]...):void +address OIDXmerge; +comment Consolidates the OID index arrangement + +pattern bat.orderidx(bv:bat[:any_1],pieces:int):void +address OIDXcreate; +comment Introduces the OID index arrangement of ordered values + +pattern bat.orderidx(bv:bat[:any_1]):void +address OIDXcreate; +comment Introduces the OID index arrangement of ordered values + pattern bat.partition(b:bat[:any_1],pieces:int,n:int):bat[:any_1] address CMDBATpartition2; comment Create the n-th slice over the BAT broken into several pieces. @@ -51056,10 +51080,18 @@ command profiler.setheartbeat(b:int):voi address CMDsetHeartbeat; comment Set heart beat performance tracing +command profiler.stoptrace(path:str):void +address CMDstopTracePath; +comment Stop collecting trace information + command profiler.stoptrace():void address CMDstopTrace; comment Stop collecting trace information +command profiler.starttrace(path:str):void +address CMDstartTracePath; +comment Start collecting trace information and keep around in 'path' directory + command profiler.starttrace():void address CMDstartTrace; comment Start collecting trace information @@ -51072,6 +51104,10 @@ pattern profiler.start():void address CMDstartProfiler; comment Start offline performance profiling +pattern querylog.append(q:str,pipe:str,usr:str,tick:timestamp):void +address QLOGappend; +comment Add a new query call to the query log + pattern querylog.call(tick1:timestamp,tick2:timestamp,arg:str,tuples:wrd,xtime:lng,rtime:lng,cpu:int,iowait:int):void address QLOGcall; comment Add a new query call to the query log @@ -51096,10 +51132,6 @@ command querylog.enable(threshold:int):v address QLOGenableThreshold; comment Turn on the query logger -pattern querylog.insert(q:str,pipe:str,usr:str,tick:timestamp):void -address QLOGinsert; -comment Add a new query call to the query log - command querylog.isset():int address QLOGissetFcn; comment Return status of query logger @@ -51390,6 +51422,10 @@ pattern sql.copy_rejects_clear():void address COPYrejects_clear; pattern sql.copy_rejects() (rowid:bat[:lng],fldid:bat[:int],msg:bat[:str],inp:bat[:str]) address COPYrejects; +pattern sql.createorderindex(sch:str,tbl:str,col:str):void +address sql_createorderindex; +comment Instantiate the order index on a column + pattern sql.copy_from(t:ptr,sep:str,rsep:str,ssep:str,ns:str,fname:str,nr:lng,offset:lng,locked:int,best:int):bat[:any]... address mvc_import_table_wrap; comment Import a table from bstream s with the given tuple and seperators (sep/rsep) @@ -51518,6 +51554,10 @@ command sql.dec_round(v:bte,r:bte):bte address bte_dec_round_wrap; comment round off the value v to nearests multiple of r +pattern sql.droporderindex(sch:str,tbl:str,col:str):void +address sql_droporderindex; +comment Drop the order index on a column + pattern sql.dump_trace() (event:bat[:int],clk:bat[:str],pc:bat[:str],thread:bat[:int],ticks:bat[:lng],rssMB:bat[:lng],vmMB:bat[:lng],reads:bat[:lng],writes:bat[:lng],minflt:bat[:lng],majflt:bat[:lng],nvcsw:bat[:lng],stmt:bat[:str]) address dump_trace; comment dump the trace statistics @@ -51785,19 +51825,19 @@ pattern sql.sysmon_pause(tag:sht):void address SYSMONpause; pattern sql.sysmon_queue() (qtag:bat[:lng],user:bat[:str],started:bat[:timestamp],estimate:bat[:timestamp],progress:bat[:int],status:bat[:str],tag:bat[:oid],query:bat[:str]) address SYSMONqueue; -pattern sql.storage(sname:str,tname:str,cname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit]) +pattern sql.storage(sname:str,tname:str,cname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit],orderidx:bat[:lng]) address sql_storage; comment return a table with storage information for a particular column -pattern sql.storage(sname:str,tname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit]) +pattern sql.storage(sname:str,tname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit],orderidx:bat[:lng]) address sql_storage; comment return a table with storage information for a particular table -pattern sql.storage(sname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit]) +pattern sql.storage(sname:str) (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit],orderidx:bat[:lng]) address sql_storage; comment return a table with storage information for a particular schema -pattern sql.storage() (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit]) +pattern sql.storage() (schema:bat[:str],table:bat[:str],column:bat[:str],type:bat[:str],mode:bat[:str],location:bat[:str],count:bat[:lng],atomwidth:bat[:int],columnsize:bat[:lng],heap:bat[:lng],hashes:bat[:lng],phash:bat[:bit],imprints:bat[:lng],sorted:bat[:bit],orderidx:bat[:lng]) address sql_storage; comment return a table with storage information diff --git a/clients/Tests/SQL-dump.stable.out b/clients/Tests/SQL-dump.stable.out --- a/clients/Tests/SQL-dump.stable.out +++ b/clients/Tests/SQL-dump.stable.out @@ -139,6 +139,7 @@ Ready. \dSf sys."columnsize" \dSf sys."contains" \dSf sys."corr" +\dSf sys."createorderindex" _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list