Changeset: 62a61d04a808 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=62a61d04a808 Added Files: sql/backends/monet5/generator/90_generator_hge.mal sql/backends/monet5/generator/90_generator_hge.sql Removed Files: sql/backends/monet5/generator/89_generator_hge.mal sql/backends/monet5/generator/89_generator_hge.sql Modified Files: clients/Tests/MAL-signatures_all.stable.out clients/Tests/MAL-signatures_all.stable.out.int128 clients/Tests/SQL-dump_all.stable.out.int128 clients/Tests/SQL-dump_all.stable.out.oid32.int128 clients/Tests/exports.stable.out monetdb5/modules/atoms/mtime.c monetdb5/modules/atoms/mtime.h monetdb5/modules/atoms/mtime.mal sql/backends/monet5/generator/Makefile.ag sql/backends/monet5/generator/Tests/generator01.stable.err sql/backends/monet5/generator/Tests/generator02.stable.out sql/backends/monet5/generator/Tests/generator04.stable.err sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_result.c sql/benchmarks/tpch/Tests/06-explain.stable.out.int128 sql/benchmarks/tpch/Tests/14-explain.stable.out.int128 sql/benchmarks/tpch/Tests/17-explain.stable.out.int128 sql/benchmarks/tpch/Tests/19-explain.stable.out.int128 sql/common/sql_types.c sql/common/sql_types.h sql/server/rel_dump.c sql/server/rel_select.c sql/server/rel_updates.c sql/server/sql_atom.c sql/server/sql_scan.c sql/test/BugDay_2005-11-09_2.9.3/Tests/date_functions.SF-967145.stable.out sql/test/BugTracker-2011/Tests/time_precision.Bug-2873.stable.out sql/test/BugTracker-2012/Tests/now_results_in_illegal_argument.Bug-2978.stable.out sql/test/BugTracker-2012/Tests/round-type-inference.Bug-2987.stable.out sql/test/BugTracker-2012/Tests/timestamp-diff.Bug-3190.stable.out sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.out sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out sql/test/BugTracker-2014/Tests/too_general_errmsg.Bug-3605.stable.err sql/test/VOC/Tests/median.Bug-3096.stable.out sql/test/bugs/Tests/default_with_cast.SF-1334486.stable.out sql/test/leaks/Tests/check1_bam.stable.out.int128 sql/test/leaks/Tests/check2_bam.stable.out.int128 sql/test/leaks/Tests/check3_bam.stable.out.int128 sql/test/leaks/Tests/check4_bam.stable.out.int128 sql/test/leaks/Tests/check5_bam.stable.out.int128 sql/test/pg_regress/Tests/case.stable.err sql/test/pg_regress/Tests/case.stable.out sql/test/pg_regress/Tests/date.stable.err sql/test/pg_regress/Tests/date.stable.out sql/test/pg_regress/Tests/horology.stable.err sql/test/pg_regress/Tests/horology.stable.out sql/test/pg_regress/Tests/interval.stable.err sql/test/pg_regress/Tests/interval.stable.out sql/test/pg_regress/Tests/numeric.stable.err sql/test/pg_regress/Tests/oid.stable.err sql/test/pg_regress/Tests/oid.stable.out sql/test/pg_regress/Tests/time.stable.err sql/test/pg_regress/Tests/time.stable.out sql/test/pg_regress/Tests/timestamp.stable.err sql/test/pg_regress/Tests/timestamp.stable.out sql/test/pg_regress/Tests/timestamptz.stable.err sql/test/pg_regress/Tests/timestamptz.stable.out sql/test/pg_regress/Tests/timetz.stable.err sql/test/pg_regress/Tests/timetz.stable.out Branch: default Log Message:
split month and second intervals into its own eclass (solves problems with conversions) extended the search for functions (solves problems with generators) diffs (truncated from 12147 to 300 lines): diff --git a/clients/Tests/MAL-signatures_all.stable.out b/clients/Tests/MAL-signatures_all.stable.out --- a/clients/Tests/MAL-signatures_all.stable.out +++ b/clients/Tests/MAL-signatures_all.stable.out @@ -37888,6 +37888,10 @@ pattern fits.listdir(dirname:str):void address FITSdir; comment Attach all FITS files in the directory +pattern generator.join(b:bat[:oid,:hge],gen:bat[:oid,:hge]) (l:bat[:oid,:oid],r:bat[:oid,:oid]) +address VLTgenerator_join; +comment Overloaded join operation + pattern generator.join(gen:bat[:oid,:dbl],low:bat[:oid,:dbl],hgh:bat[:oid,:dbl],li:bit,ri:bit) (l:bat[:oid,:oid],r:bat[:oid,:oid]) address VLTgenerator_rangejoin; comment Overloaded range join operation @@ -39562,6 +39566,10 @@ command mtime.date_add_month_interval(t: address MTIMEdate_addmonths; comment Add months to a date +command mtime.diff(val1:daytime,val2:daytime):lng +address MTIMEdaytime_diff; +comment returns the number of msec between 'val1' and 'val2'. + command mtime.date_add_msec_interval(t:date,ms:lng):date address MTIMEdate_add_msec_interval_lng_wrap; command mtime.date_add_sec_interval(t:date,s:int):date diff --git a/clients/Tests/MAL-signatures_all.stable.out.int128 b/clients/Tests/MAL-signatures_all.stable.out.int128 --- a/clients/Tests/MAL-signatures_all.stable.out.int128 +++ b/clients/Tests/MAL-signatures_all.stable.out.int128 @@ -48771,6 +48771,10 @@ pattern fits.listdir(dirname:str):void address FITSdir; comment Attach all FITS files in the directory +pattern generator.join(b:bat[:oid,:hge],gen:bat[:oid,:hge]) (l:bat[:oid,:oid],r:bat[:oid,:oid]) +address VLTgenerator_join; +comment Overloaded join operation + pattern generator.join(gen:bat[:oid,:dbl],low:bat[:oid,:dbl],hgh:bat[:oid,:dbl],li:bit,ri:bit) (l:bat[:oid,:oid],r:bat[:oid,:oid]) address VLTgenerator_rangejoin; comment Overloaded range join operation @@ -48799,9 +48803,9 @@ pattern generator.join(b:bat[:oid,:sht], address VLTgenerator_join; pattern generator.join(b:bat[:oid,:bte],gen:bat[:oid,:bte]) (l:bat[:oid,:oid],r:bat[:oid,:oid]) address VLTgenerator_join; -pattern generator.join(b:bat[:oid,:hge],gen:bat[:oid,:hge]) (l:bat[:oid,:oid],r:bat[:oid,:oid]) -address VLTgenerator_join; -comment Overloaded join operation +pattern generator.leftfetchjoin(b:bat[:oid,:oid],cand:bat[:oid,:hge]):bat[:oid,:hge] +address VLTgenerator_leftfetchjoin; +comment Overloaded leftfetchjoin operation pattern generator.leftfetchjoin(b:bat[:oid,:oid],cand:bat[:oid,:timestamp]):bat[:oid,:timestamp] address VLTgenerator_leftfetchjoin; @@ -48819,9 +48823,11 @@ pattern generator.leftfetchjoin(b:bat[:o address VLTgenerator_leftfetchjoin; pattern generator.leftfetchjoin(b:bat[:oid,:oid],cand:bat[:oid,:bte]):bat[:oid,:bte] address VLTgenerator_leftfetchjoin; -pattern generator.leftfetchjoin(b:bat[:oid,:oid],cand:bat[:oid,:hge]):bat[:oid,:hge] -address VLTgenerator_leftfetchjoin; -comment Overloaded leftfetchjoin operation +pattern generator.parameters(first:hge,last:hge):bat[:oid,:hge] +address VLTgenerator_noop; +pattern generator.parameters(first:hge,last:hge,step:hge):bat[:oid,:hge] +address VLTgenerator_noop; +comment Retain the table definition, but don't materialize pattern generator.parameters(first:dbl,last:dbl):bat[:oid,:dbl] address VLTgenerator_noop; @@ -48851,12 +48857,20 @@ pattern generator.parameters(first:sht,l address VLTgenerator_noop; pattern generator.parameters(first:bte,last:bte,step:bte):bat[:oid,:bte] address VLTgenerator_noop; -pattern generator.parameters(first:hge,last:hge):bat[:oid,:hge] -address VLTgenerator_noop; -pattern generator.parameters(first:hge,last:hge,step:hge):bat[:oid,:hge] -address VLTgenerator_noop; -comment Retain the table definition, but don't materialize - +pattern generator.subselect(b:bat[:oid,:hge],cand:bat[:oid,:oid],low:hge,high:hge,li:bit,hi:bit,anti:bit):bat[:oid,:oid] +address VLTgenerator_subselect; +comment Overloaded selection routine + +pattern generator.subselect(b:bat[:oid,:hge],low:hge,high:hge,li:bit,hi:bit,anti:bit):bat[:oid,:oid] +address VLTgenerator_subselect; +comment Overloaded selection routine + +pattern generator.series(first:hge,last:hge,step:hge):bat[:oid,:hge] +address VLTgenerator_table; +comment Create and materialize a generator table + +pattern generator.series(first:hge,last:hge):bat[:oid,:hge] +address VLTgenerator_table; pattern generator.subselect(b:bat[:oid,:timestamp],cand:bat[:oid,:oid],low:timestamp,high:timestamp,li:bit,hi:bit,anti:bit):bat[:oid,:oid] address VLTgenerator_subselect; comment Overloaded selection routine @@ -48917,20 +48931,14 @@ pattern generator.series(first:sht,last: address VLTgenerator_table; pattern generator.series(first:bte,last:bte):bat[:oid,:bte] address VLTgenerator_table; -pattern generator.subselect(b:bat[:oid,:hge],cand:bat[:oid,:oid],low:hge,high:hge,li:bit,hi:bit,anti:bit):bat[:oid,:oid] -address VLTgenerator_subselect; +pattern generator.thetasubselect(b:bat[:oid,:hge],cnd:bat[:oid,:oid],low:hge,oper:str):bat[:oid,:oid] +address VLTgenerator_thetasubselect; comment Overloaded selection routine -pattern generator.subselect(b:bat[:oid,:hge],low:hge,high:hge,li:bit,hi:bit,anti:bit):bat[:oid,:oid] -address VLTgenerator_subselect; +pattern generator.thetasubselect(b:bat[:oid,:hge],low:hge,oper:str):bat[:oid,:oid] +address VLTgenerator_thetasubselect; comment Overloaded selection routine -pattern generator.series(first:hge,last:hge,step:hge):bat[:oid,:hge] -address VLTgenerator_table; -comment Create and materialize a generator table - -pattern generator.series(first:hge,last:hge):bat[:oid,:hge] -address VLTgenerator_table; pattern generator.thetasubselect(b:bat[:oid,:timestamp],cnd:bat[:oid,:oid],low:timestamp,oper:str):bat[:oid,:oid] address VLTgenerator_thetasubselect; comment Overloaded selection routine @@ -48963,14 +48971,6 @@ pattern generator.thetasubselect(b:bat[: address VLTgenerator_thetasubselect; pattern generator.thetasubselect(b:bat[:oid,:bte],low:bte,oper:str):bat[:oid,:oid] address VLTgenerator_thetasubselect; -pattern generator.thetasubselect(b:bat[:oid,:hge],cnd:bat[:oid,:oid],low:hge,oper:str):bat[:oid,:oid] -address VLTgenerator_thetasubselect; -comment Overloaded selection routine - -pattern generator.thetasubselect(b:bat[:oid,:hge],low:hge,oper:str):bat[:oid,:oid] -address VLTgenerator_thetasubselect; -comment Overloaded selection routine - command geom.Area(g:wkb):dbl address wkbArea; comment Returns the area of the geometry. @@ -50497,6 +50497,10 @@ command mtime.date_add_month_interval(t: address MTIMEdate_addmonths; comment Add months to a date +command mtime.diff(val1:daytime,val2:daytime):lng +address MTIMEdaytime_diff; +comment returns the number of msec between 'val1' and 'val2'. + command mtime.date_add_msec_interval(t:date,ms:lng):date address MTIMEdate_add_msec_interval_lng_wrap; command mtime.date_add_sec_interval(t:date,s:int):date diff --git a/clients/Tests/SQL-dump_all.stable.out.int128 b/clients/Tests/SQL-dump_all.stable.out.int128 --- a/clients/Tests/SQL-dump_all.stable.out.int128 +++ b/clients/Tests/SQL-dump_all.stable.out.int128 @@ -729,31 +729,6 @@ returns hugeint external name udf.fuse; -- (c) Author M.Kersten -create function sys.generate_series(first hugeint, last hugeint) -returns table (value hugeint) -external name generator.series; -create function sys.generate_series(first hugeint, last hugeint, stepsize hugeint) -returns table (value hugeint) -external name generator.series; --- The contents of this file are subject to the MonetDB Public License --- Version 1.1 (the "License"); you may not use this file except in --- compliance with the License. You may obtain a copy of the License at --- http://www.monetdb.org/Legal/MonetDBLicense --- --- Software distributed under the License is distributed on an "AS IS" --- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the --- License for the specific language governing rights and limitations --- under the License. --- --- The Original Code is the MonetDB Database System. --- --- The Initial Developer of the Original Code is CWI. --- Portions created by CWI are Copyright (C) 1997-July 2008 CWI. --- Copyright August 2008-2015 MonetDB B.V. --- All Rights Reserved. - --- (c) Author M.Kersten - create function sys.generate_series(first tinyint, last tinyint) returns table (value tinyint) external name generator.series; @@ -790,6 +765,31 @@ external name generator.series; create function sys.generate_series(first timestamp, last timestamp, stepsize interval second) returns table (value timestamp) external name generator.series; +-- The contents of this file are subject to the MonetDB Public License +-- Version 1.1 (the "License"); you may not use this file except in +-- compliance with the License. You may obtain a copy of the License at +-- http://www.monetdb.org/Legal/MonetDBLicense +-- +-- Software distributed under the License is distributed on an "AS IS" +-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +-- License for the specific language governing rights and limitations +-- under the License. +-- +-- The Original Code is the MonetDB Database System. +-- +-- The Initial Developer of the Original Code is CWI. +-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI. +-- Copyright August 2008-2015 MonetDB B.V. +-- All Rights Reserved. + +-- (c) Author M.Kersten + +create function sys.generate_series(first hugeint, last hugeint) +returns table (value hugeint) +external name generator.series; +create function sys.generate_series(first hugeint, last hugeint, stepsize hugeint) +returns table (value hugeint) +external name generator.series; create function geomcollectionfromtext(wkt string, srid smallint) returns multipolygon external name geom."GeomCollectionFromText"; create function geometrytypeid(g geometry) returns integer external name geom."GeometryTypeId"; -- The srid in the *FromText Functions is currently not used @@ -1747,202 +1747,202 @@ 2149 "statement" "varchar" 2048 0 2139 N 2151 "id" "int" 32 0 2150 NULL true 0 NULL 2152 "name" "varchar" 1024 0 2150 NULL true 1 NULL 2153 "nr" "int" 32 0 2150 NULL true 2 NULL -5649 "id" "int" 32 0 5648 NULL true 0 NULL -5650 "name" "varchar" 1024 0 5648 NULL true 1 NULL -5651 "schema_id" "int" 32 0 5648 NULL true 2 NULL -5652 "query" "varchar" 2048 0 5648 NULL true 3 NULL -5653 "type" "smallint" 16 0 5648 NULL true 4 NULL -5654 "system" "boolean" 1 0 5648 NULL true 5 NULL -5655 "commit_action" "smallint" 16 0 5648 NULL true 6 NULL -5656 "access" "smallint" 16 0 5648 NULL true 7 NULL -5657 "temporary" "smallint" 16 0 5648 NULL true 8 NULL -5659 "id" "int" 32 0 5658 NULL true 0 NULL -5660 "name" "varchar" 1024 0 5658 NULL true 1 NULL -5661 "type" "varchar" 1024 0 5658 NULL true 2 NULL -5662 "type_digits" "int" 32 0 5658 NULL true 3 NULL -5663 "type_scale" "int" 32 0 5658 NULL true 4 NULL -5664 "table_id" "int" 32 0 5658 NULL true 5 NULL -5665 "default" "varchar" 2048 0 5658 NULL true 6 NULL -5666 "null" "boolean" 1 0 5658 NULL true 7 NULL -5667 "number" "int" 32 0 5658 NULL true 8 NULL -5668 "storage" "varchar" 2048 0 5658 NULL true 9 NULL -5675 "name" "varchar" 1024 0 5674 NULL true 0 NULL -5676 "fullname" "varchar" 2048 0 5674 NULL true 1 NULL -5677 "default_schema" "int" 9 0 5674 NULL true 2 NULL +5655 "id" "int" 32 0 5654 NULL true 0 NULL +5656 "name" "varchar" 1024 0 5654 NULL true 1 NULL +5657 "schema_id" "int" 32 0 5654 NULL true 2 NULL +5658 "query" "varchar" 2048 0 5654 NULL true 3 NULL +5659 "type" "smallint" 16 0 5654 NULL true 4 NULL +5660 "system" "boolean" 1 0 5654 NULL true 5 NULL +5661 "commit_action" "smallint" 16 0 5654 NULL true 6 NULL +5662 "access" "smallint" 16 0 5654 NULL true 7 NULL +5663 "temporary" "smallint" 16 0 5654 NULL true 8 NULL +5665 "id" "int" 32 0 5664 NULL true 0 NULL +5666 "name" "varchar" 1024 0 5664 NULL true 1 NULL +5667 "type" "varchar" 1024 0 5664 NULL true 2 NULL +5668 "type_digits" "int" 32 0 5664 NULL true 3 NULL +5669 "type_scale" "int" 32 0 5664 NULL true 4 NULL +5670 "table_id" "int" 32 0 5664 NULL true 5 NULL +5671 "default" "varchar" 2048 0 5664 NULL true 6 NULL +5672 "null" "boolean" 1 0 5664 NULL true 7 NULL +5673 "number" "int" 32 0 5664 NULL true 8 NULL +5674 "storage" "varchar" 2048 0 5664 NULL true 9 NULL 5681 "name" "varchar" 1024 0 5680 NULL true 0 NULL -5682 "fullname" "varchar" 2024 0 5680 NULL true 1 NULL +5682 "fullname" "varchar" 2048 0 5680 NULL true 1 NULL 5683 "default_schema" "int" 9 0 5680 NULL true 2 NULL -5685 "login_id" "int" 32 0 5684 NULL true 0 NULL -5686 "role_id" "int" 32 0 5684 NULL true 1 NULL -5688 "id" "int" 32 0 5687 NULL true 0 NULL -5689 "name" "varchar" 1024 0 5687 NULL true 1 NULL -5690 "grantor" "int" 32 0 5687 NULL true 2 NULL -5692 "obj_id" "int" 32 0 5691 NULL true 0 NULL -5693 "auth_id" "int" 32 0 5691 NULL true 1 NULL -5694 "privileges" "int" 32 0 5691 NULL true 2 NULL -5695 "grantor" "int" 32 0 5691 NULL true 3 NULL -5696 "grantable" "int" 32 0 5691 NULL true 4 NULL -5885 "id" "oid" 63 0 5893 NULL true 0 NULL -5886 "owner" "clob" 0 0 5893 NULL true 1 NULL -5887 "defined" "timestamp" 7 0 5893 NULL true 2 NULL -5888 "query" "clob" 0 0 5893 NULL true 3 NULL -5889 "pipe" "clob" 0 0 5893 NULL true 4 NULL -5890 "plan" "clob" 0 0 5893 NULL true 5 NULL -5891 "mal" "int" 32 0 5893 NULL true 6 NULL -5892 "optimize" "bigint" 64 0 5893 NULL true 7 NULL -5895 "id" "oid" 63 0 5904 NULL true 0 NULL -5896 "start" "timestamp" 7 0 5904 NULL true 1 NULL -5897 "stop" "timestamp" 7 0 5904 NULL true 2 NULL -5898 "arguments" "clob" 0 0 5904 NULL true 3 NULL -5899 "tuples" "wrd" 64 0 5904 NULL true 4 NULL -5900 "run" "bigint" 64 0 5904 NULL true 5 NULL -5901 "ship" "bigint" 64 0 5904 NULL true 6 NULL -5902 "cpu" "int" 32 0 5904 NULL true 7 NULL -5903 "io" "int" 32 0 5904 NULL true 8 NULL -5906 "id" "oid" 63 0 5922 NULL true 0 NULL -5907 "owner" "clob" 0 0 5922 NULL true 1 NULL -5908 "defined" "timestamp" 7 0 5922 NULL true 2 NULL -5909 "query" "clob" 0 0 5922 NULL true 3 NULL -5910 "pipe" "clob" 0 0 5922 NULL true 4 NULL -5911 "plan" "clob" 0 0 5922 NULL true 5 NULL -5912 "mal" "int" 32 0 5922 NULL true 6 NULL -5913 "optimize" "bigint" 64 0 5922 NULL true 7 NULL -5914 "start" "timestamp" 7 0 5922 NULL true 8 NULL -5915 "stop" "timestamp" 7 0 5922 NULL true 9 NULL -5916 "arguments" "clob" 0 0 5922 NULL true 10 NULL -5917 "tuples" "wrd" 64 0 5922 NULL true 11 NULL _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list