Changeset: 106a1b1e2388 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=106a1b1e2388
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
        monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.32bit
        sql/test/emptydb/Tests/check.stable.out.int128
        sql/test/mapi/Tests/sql_int128.stable.out.int128
        sql/test/sys-schema/Tests/systemfunctions.stable.out
        sql/test/sys-schema/Tests/systemfunctions.stable.out.int128
Branch: unlock
Log Message:

approved output


diffs (truncated from 664 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
@@ -64,7 +64,7 @@ stdout of test 'MAL-signatures` in direc
 % .%1, .%1,    .%1,    .%1,    .%1 # table_name
 % module,      function,       signature,      address,        comment # name
 % clob,        clob,   clob,   clob,   clob # type
-% 12,  28,     364,    38,     874 # length
+% 12,  28,     364,    39,     874 # length
 [ "aggr",      "allnotequal",  "command aggr.allnotequal(l:bat[:any_1], 
r:bat[:any_1]):bit ",  "SQLallnotequal;",      "if all values in r are not 
equal to l return true, else if r has nil nil else false"   ]
 [ "aggr",      "anyequal",     "pattern aggr.anyequal(l:any_1, r:any_1):bit ", 
"CMDvarEQ;",    ""      ]
 [ "aggr",      "anyequal",     "command aggr.anyequal(l:bat[:any_1], 
r:bat[:any_1]):bit ",     "SQLanyequal;", "if any value in r is equal to l 
return true, else if r has nil nil else false" ]
@@ -718,6 +718,7 @@ stdout of test 'MAL-signatures` in direc
 [ "batalgebra",        "not_ilike",    "command 
batalgebra.not_ilike(s:bat[:str], pat:str, esc:str):bat[:bit] ",       
"BATPCREnotilike;",     ""      ]
 [ "batalgebra",        "not_like",     "command 
batalgebra.not_like(s:bat[:str], pat:str):bat[:bit] ", "BATPCREnotlike2;",     
""      ]
 [ "batalgebra",        "not_like",     "command 
batalgebra.not_like(s:bat[:str], pat:str, esc:str):bat[:bit] ",        
"BATPCREnotlike;",      ""      ]
+[ "batblob",   "nitems",       "command batblob.nitems(b:bat[:blob]):bat[:int] 
",      "BLOBnitems_bulk;",     ""      ]
 [ "batcalc",   "!=",   "pattern batcalc.!=(b1:bat[:any_1], 
b2:bat[:any_1]):bat[:bit] ",        "CMDbatNE;",    "Return B1 != B2"       ]
 [ "batcalc",   "!=",   "pattern batcalc.!=(b1:bat[:any_1], b2:bat[:any_1], 
nil_matches:bit):bat[:bit] ",       "CMDbatNE;",    "Return B1 != B2"       ]
 [ "batcalc",   "!=",   "pattern batcalc.!=(b1:bat[:any_1], b2:bat[:any_1], 
r:bat[:bit]):bat[:bit] ",   "CMDbatNE;",    "Return B1 != B2"       ]
@@ -8132,12 +8133,16 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "cmp",  "pattern batcalc.cmp(v:str, b:bat[:str], 
r:bat[:bit]):bat[:bte] ",      "CMDbatCMP;",   "Return -1/0/1 if V </==/> B"   ]
 [ "batcalc",   "cmp",  "pattern batcalc.cmp(v:str, b:bat[:str], 
s:bat[:oid]):bat[:bte] ",      "CMDbatCMP;",   "Return -1/0/1 if V </==/> B 
with candidates list"      ]
 [ "batcalc",   "cmp",  "pattern batcalc.cmp(v:str, b:bat[:str], s:bat[:oid], 
r:bat[:bit]):bat[:bte] ", "CMDbatCMP;",   "Return -1/0/1 if V </==/> B with 
candidates list"      ]
+[ "batcalc",   "date", "command batcalc.date(d:bat[:date]):bat[:date] ",       
"MTIMEdate_date_bulk;", ""      ]
+[ "batcalc",   "date", "command batcalc.date(s:bat[:str]):bat[:date] ",        
"MTIMEdate_fromstr_bulk;",      ""      ]
 [ "batcalc",   "date", "command batcalc.date(t:bat[:timestamp]):bat[:date] ",  
"MTIMEtimestamp_extract_date_bulk;",    ""      ]
 [ "batcalc",   "date", "command batcalc.date(v:bat[:oid]):bat[:date] ",        
"batnil_2_date;",       "cast to date"  ]
 [ "batcalc",   "date", "command batcalc.date(v:bat[:oid], 
r:bat[:bit]):bat[:date] ",   "batnil_ce_2_date;",    "cast to date"  ]
 [ "batcalc",   "date", "command batcalc.date(v:bat[:str]):bat[:date] ",        
"batstr_2_date;",       "cast to date"  ]
 [ "batcalc",   "date", "command batcalc.date(v:bat[:str], 
r:bat[:bit]):bat[:date] ",   "batstr_ce_2_date;",    "cast to date"  ]
+[ "batcalc",   "daytime",      "command 
batcalc.daytime(d:bat[:daytime]):bat[:daytime] ",      
"MTIMEdaytime_daytime_bulk;",   ""      ]
 [ "batcalc",   "daytime",      "command 
batcalc.daytime(s:bat[:lng]):bat[:daytime] ",  
"MTIMEdaytime_fromseconds_bulk;",       ""      ]
+[ "batcalc",   "daytime",      "command 
batcalc.daytime(s:bat[:str]):bat[:daytime] ",  "MTIMEdaytime_fromstr_bulk;",   
""      ]
 [ "batcalc",   "daytime",      "command 
batcalc.daytime(t:bat[:timestamp]):bat[:daytime] ",    
"MTIMEtimestamp_extract_daytime_bulk;", ""      ]
 [ "batcalc",   "daytime",      "command batcalc.daytime(v:bat[:daytime], 
digits:int):bat[:daytime] ",  "batdaytime_2time_daytime;",    "cast daytime to 
daytime and check for overflow"        ]
 [ "batcalc",   "daytime",      "command batcalc.daytime(v:bat[:oid], 
digits:int):bat[:daytime] ",      "batnil_2time_daytime;",        "cast to 
daytime and check for overflow"        ]
@@ -10932,6 +10937,8 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "timestamp",    "command 
batcalc.timestamp(d:bat[:date]):bat[:timestamp] ",     
"MTIMEtimestamp_fromdate_bulk;",        ""      ]
 [ "batcalc",   "timestamp",    "command 
batcalc.timestamp(msecs:bat[:lng]):bat[:timestamp] ",  
"MTIMEtimestamp_frommsec_bulk;",        ""      ]
 [ "batcalc",   "timestamp",    "command 
batcalc.timestamp(secs:bat[:int]):bat[:timestamp] ",   
"MTIMEtimestamp_fromsecond_bulk;",      ""      ]
+[ "batcalc",   "timestamp",    "command 
batcalc.timestamp(s:bat[:str]):bat[:timestamp] ",      
"MTIMEtimestamp_fromstr_bulk;", ""      ]
+[ "batcalc",   "timestamp",    "command 
batcalc.timestamp(t:bat[:timestamp]):bat[:timestamp] ",        
"MTIMEtimestamp_timestamp_bulk;",       ""      ]
 [ "batcalc",   "timestamp",    "command batcalc.timestamp(v:bat[:oid], 
digits:int):bat[:timestamp] ",  "batnil_2time_timestamp;",      "cast to 
timestamp and check for overflow"      ]
 [ "batcalc",   "timestamp",    "command batcalc.timestamp(v:bat[:oid], 
digits:int, r:bat[:BAT]):bat[:timestamp] ",     "batnil_ce_2time_timestamp;",   
"cast to timestamp and check for overflow"      ]
 [ "batcalc",   "timestamp",    "command batcalc.timestamp(v:bat[:str], 
digits:int):bat[:timestamp] ",  "batstr_2time_timestamp;",      "cast to 
timestamp and check for overflow"      ]
@@ -11310,31 +11317,53 @@ stdout of test 'MAL-signatures` in direc
 [ "batmmath",  "tanh", "pattern batmmath.tanh(x:bat[:flt], s:bat[:oid], 
r:bat[:bit]):bat[:flt] ",      "CMDscience_bat_tanh;", ""      ]
 [ "batmtime",  "addmonths",    "command batmtime.addmonths(value:bat[:date], 
months:bat[:int]):bat[:date] ",   "MTIMEdate_addmonths_bulk;",    ""      ]
 [ "batmtime",  "century",      "command 
batmtime.century(d:bat[:date]):bat[:int] ",    
"MTIMEdate_extract_century_bulk;",      ""      ]
+[ "batmtime",  "century",      "command 
batmtime.century(t:bat[:timestamp]):bat[:int] ",       
"MTIMEtimestamp_century_bulk;", ""      ]
 [ "batmtime",  "date_add_msec_interval",       "command 
batmtime.date_add_msec_interval(t:bat[:date], ms:bat[:lng]):bat[:date] ",      
"MTIMEdate_add_msec_interval_bulk;",    ""      ]
 [ "batmtime",  "date_sub_month_interval",      "command 
batmtime.date_sub_month_interval(value:bat[:date], months:bat[:int]):bat[:date] 
",     "MTIMEdate_submonths_bulk;",    ""      ]
 [ "batmtime",  "date_sub_msec_interval",       "command 
batmtime.date_sub_msec_interval(t:bat[:date], ms:bat[:lng]):bat[:date] ",      
"MTIMEdate_sub_msec_interval_bulk;",    ""      ]
+[ "batmtime",  "date_to_str",  "command batmtime.date_to_str(d:bat[:str], 
format:bat[:str]):bat[:str] ",       "MTIMEdate_to_str_bulk;",       ""      ]
 [ "batmtime",  "day",  "command batmtime.day(d:bat[:date]):bat[:int] ",        
"MTIMEdate_extract_day_bulk;",  ""      ]
+[ "batmtime",  "day",  "command batmtime.day(msecs:bat[:lng]):bat[:lng] ",     
"MTIMEsql_day_bulk;",   ""      ]
+[ "batmtime",  "day",  "command batmtime.day(t:bat[:timestamp]):bat[:int] ",   
"MTIMEtimestamp_day_bulk;",     ""      ]
 [ "batmtime",  "dayofweek",    "command 
batmtime.dayofweek(d:bat[:date]):bat[:int] ",  
"MTIMEdate_extract_dayofweek_bulk;",    ""      ]
 [ "batmtime",  "dayofyear",    "command 
batmtime.dayofyear(d:bat[:date]):bat[:int] ",  
"MTIMEdate_extract_dayofyear_bulk;",    ""      ]
 [ "batmtime",  "decade",       "command 
batmtime.decade(d:bat[:date]):bat[:int] ",     
"MTIMEdate_extract_decade_bulk;",       ""      ]
+[ "batmtime",  "decade",       "command 
batmtime.decade(t:bat[:timestamp]):bat[:int] ",        
"MTIMEtimestamp_decade_bulk;",  ""      ]
 [ "batmtime",  "diff", "command batmtime.diff(b1:bat[:date], 
b2:bat[:date]):bat[:int] ",       "MTIMEdate_diff_bulk;", "Difference of two 
sets of date."       ]
-[ "batmtime",  "diff", "command batmtime.diff(val1:bat[:date], 
val2:bat[:date]):bat[:int] ",   "MTIMEdate_diff_bulk;", "returns the number of 
days\n\tbetween 'val1' and 'val2'."      ]
 [ "batmtime",  "diff", "command batmtime.diff(b1:bat[:daytime], 
b2:bat[:daytime]):bat[:lng] ", "MTIMEdaytime_diff_msec_bulk;", "Difference of 
two sets of daytime."    ]
 [ "batmtime",  "diff", "command batmtime.diff(b1:bat[:timestamp], 
b2:bat[:timestamp]):bat[:lng] ",     "MTIMEtimestamp_diff_msec_bulk;",       
"Difference of two sets of timestamp."  ]
+[ "batmtime",  "epoch",        "command 
batmtime.epoch(t:bat[:timestamp]):bat[:int] ", 
"MTIMEseconds_since_epoch_bulk;",       ""      ]
+[ "batmtime",  "epoch",        "command 
batmtime.epoch(t:bat[:lng]):bat[:timestamp] ", "MTIMEtimestamp_frommsec_bulk;", 
       ""      ]
+[ "batmtime",  "epoch",        "command 
batmtime.epoch(t:bat[:int]):bat[:timestamp] ", 
"MTIMEtimestamp_fromsecond_bulk;",      ""      ]
 [ "batmtime",  "hours",        "command 
batmtime.hours(d:bat[:daytime]):bat[:int] ",   
"MTIMEdaytime_extract_hours_bulk;",     ""      ]
+[ "batmtime",  "hours",        "command 
batmtime.hours(msecs:bat[:lng]):bat[:int] ",   "MTIMEsql_hours_bulk;", ""      ]
+[ "batmtime",  "hours",        "command 
batmtime.hours(t:bat[:timestamp]):bat[:int] ", "MTIMEtimestamp_hours_bulk;",   
""      ]
 [ "batmtime",  "minutes",      "command 
batmtime.minutes(d:bat[:daytime]):bat[:int] ", 
"MTIMEdaytime_extract_minutes_bulk;",   ""      ]
+[ "batmtime",  "minutes",      "command 
batmtime.minutes(msecs:bat[:lng]):bat[:int] ", "MTIMEsql_minutes_bulk;",       
""      ]
+[ "batmtime",  "minutes",      "command 
batmtime.minutes(t:bat[:timestamp]):bat[:int] ",       
"MTIMEtimestamp_minutes_bulk;", ""      ]
 [ "batmtime",  "month",        "command batmtime.month(d:bat[:date]):bat[:int] 
",      "MTIMEdate_extract_month_bulk;",        ""      ]
+[ "batmtime",  "month",        "command 
batmtime.month(months:bat[:int]):bat[:int] ",  "MTIMEsql_month_bulk;", ""      ]
+[ "batmtime",  "month",        "command 
batmtime.month(t:bat[:timestamp]):bat[:int] ", "MTIMEtimestamp_month_bulk;",   
""      ]
 [ "batmtime",  "quarter",      "command 
batmtime.quarter(d:bat[:date]):bat[:int] ",    
"MTIMEdate_extract_quarter_bulk;",      ""      ]
+[ "batmtime",  "quarter",      "command 
batmtime.quarter(t:bat[:timestamp]):bat[:int] ",       
"MTIMEtimestamp_quarter_bulk;", ""      ]
+[ "batmtime",  "seconds",      "command 
batmtime.seconds(msecs:bat[:lng]):bat[:int] ", "MTIMEsql_seconds_bulk;",       
""      ]
 [ "batmtime",  "sql_seconds",  "command 
batmtime.sql_seconds(d:bat[:daytime]):bat[:int] ",     
"MTIMEdaytime_extract_sql_seconds_bulk;",       ""      ]
 [ "batmtime",  "sql_seconds",  "command 
batmtime.sql_seconds(d:bat[:timestamp]):bat[:int] ",   
"MTIMEtimestamp_sql_seconds_bulk;",     ""      ]
+[ "batmtime",  "str_to_date",  "command batmtime.str_to_date(s:bat[:str], 
format:bat[:str]):bat[:date] ",      "MTIMEstr_to_date_bulk;",       ""      ]
+[ "batmtime",  "str_to_time",  "command batmtime.str_to_time(s:bat[:str], 
format:bat[:str]):bat[:daytime] ",   "MTIMEstr_to_time_bulk;",       ""      ]
+[ "batmtime",  "str_to_timestamp",     "command 
batmtime.str_to_timestamp(d:bat[:str], format:bat[:str]):bat[:timestamp] ",    
"MTIMEstr_to_timestamp_bulk;",  ""      ]
 [ "batmtime",  "time_add_msec_interval",       "command 
batmtime.time_add_msec_interval(t:bat[:daytime], ms:bat[:lng]):bat[:daytime] ", 
       "MTIMEtime_add_msec_interval_bulk;",    ""      ]
 [ "batmtime",  "time_sub_msec_interval",       "command 
batmtime.time_sub_msec_interval(t:bat[:daytime], ms:bat[:lng]):bat[:daytime] ", 
       "MTIMEtime_sub_msec_interval_bulk;",    ""      ]
+[ "batmtime",  "time_to_str",  "command batmtime.time_to_str(d:bat[:daytime], 
format:bat[:str]):bat[:str] ",   "MTIMEtime_to_str_bulk;",       ""      ]
 [ "batmtime",  "timestamp_add_month_interval", "command 
batmtime.timestamp_add_month_interval(t:bat[:timestamp], 
s:bat[:int]):bat[:timestamp] ",       
"MTIMEtimestamp_add_month_interval_bulk;",      ""      ]
 [ "batmtime",  "timestamp_add_msec_interval",  "command 
batmtime.timestamp_add_msec_interval(t:bat[:timestamp], 
ms:bat[:lng]):bat[:timestamp] ",       
"MTIMEtimestamp_add_msec_interval_bulk;",       ""      ]
 [ "batmtime",  "timestamp_sub_month_interval", "command 
batmtime.timestamp_sub_month_interval(t:bat[:timestamp], 
s:bat[:int]):bat[:timestamp] ",       
"MTIMEtimestamp_sub_month_interval_bulk;",      ""      ]
 [ "batmtime",  "timestamp_sub_msec_interval",  "command 
batmtime.timestamp_sub_msec_interval(t:bat[:timestamp], 
ms:bat[:lng]):bat[:timestamp] ",       
"MTIMEtimestamp_sub_msec_interval_bulk;",       ""      ]
+[ "batmtime",  "timestamp_to_str",     "command 
batmtime.timestamp_to_str(d:bat[:timestamp], format:bat[:str]):bat[:str] ",    
"MTIMEtimestamp_to_str_bulk;",  ""      ]
 [ "batmtime",  "weekofyear",   "command 
batmtime.weekofyear(d:bat[:date]):bat[:int] ", 
"MTIMEdate_extract_weekofyear_bulk;",   ""      ]
 [ "batmtime",  "year", "command batmtime.year(d:bat[:date]):bat[:int] ",       
"MTIMEdate_extract_year_bulk;", ""      ]
+[ "batmtime",  "year", "command batmtime.year(months:bat[:int]):bat[:int] ",   
"MTIMEsql_year_bulk;",  ""      ]
+[ "batmtime",  "year", "command batmtime.year(t:bat[:timestamp]):bat[:int] ",  
"MTIMEtimestamp_year_bulk;",    ""      ]
 [ "batpcre",   "replace",      "command batpcre.replace(orig:bat[:str], 
pat:str, repl:str, flag:str):bat[:str] ",      "PCREreplace_bat_wrap;",        
""      ]
 [ "batpcre",   "replace_first",        "command 
batpcre.replace_first(orig:bat[:str], pat:str, repl:str, flag:str):bat[:str] ", 
       "PCREreplacefirst_bat_wrap;",   ""      ]
 [ "batpyapi3", "eval", "unsafe pattern batpyapi3.eval(fptr:ptr, expr:str, 
arg:any...):any... ",        "PYAPI3PyAPIevalStd;",  "Execute a simple Python 
script value"  ]
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
@@ -68,7 +68,7 @@ stdout of test 'MAL-signatures` in direc
 % .%1, .%1,    .%1,    .%1,    .%1 # table_name
 % module,      function,       signature,      address,        comment # name
 % clob,        clob,   clob,   clob,   clob # type
-% 12,  28,     364,    38,     874 # length
+% 12,  28,     364,    39,     874 # length
 [ "aggr",      "allnotequal",  "command aggr.allnotequal(l:bat[:any_1], 
r:bat[:any_1]):bit ",  "SQLallnotequal;",      "if all values in r are not 
equal to l return true, else if r has nil nil else false"   ]
 [ "aggr",      "anyequal",     "pattern aggr.anyequal(l:any_1, r:any_1):bit ", 
"CMDvarEQ;",    ""      ]
 [ "aggr",      "anyequal",     "command aggr.anyequal(l:bat[:any_1], 
r:bat[:any_1]):bit ",     "SQLanyequal;", "if any value in r is equal to l 
return true, else if r has nil nil else false" ]
@@ -829,6 +829,7 @@ stdout of test 'MAL-signatures` in direc
 [ "batalgebra",        "not_ilike",    "command 
batalgebra.not_ilike(s:bat[:str], pat:str, esc:str):bat[:bit] ",       
"BATPCREnotilike;",     ""      ]
 [ "batalgebra",        "not_like",     "command 
batalgebra.not_like(s:bat[:str], pat:str):bat[:bit] ", "BATPCREnotlike2;",     
""      ]
 [ "batalgebra",        "not_like",     "command 
batalgebra.not_like(s:bat[:str], pat:str, esc:str):bat[:bit] ",        
"BATPCREnotlike;",      ""      ]
+[ "batblob",   "nitems",       "command batblob.nitems(b:bat[:blob]):bat[:int] 
",      "BLOBnitems_bulk;",     ""      ]
 [ "batcalc",   "!=",   "pattern batcalc.!=(b1:bat[:any_1], 
b2:bat[:any_1]):bat[:bit] ",        "CMDbatNE;",    "Return B1 != B2"       ]
 [ "batcalc",   "!=",   "pattern batcalc.!=(b1:bat[:any_1], b2:bat[:any_1], 
nil_matches:bit):bat[:bit] ",       "CMDbatNE;",    "Return B1 != B2"       ]
 [ "batcalc",   "!=",   "pattern batcalc.!=(b1:bat[:any_1], b2:bat[:any_1], 
r:bat[:bit]):bat[:bit] ",   "CMDbatNE;",    "Return B1 != B2"       ]
@@ -11603,12 +11604,16 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "cmp",  "pattern batcalc.cmp(v:str, b:bat[:str], 
r:bat[:bit]):bat[:bte] ",      "CMDbatCMP;",   "Return -1/0/1 if V </==/> B"   ]
 [ "batcalc",   "cmp",  "pattern batcalc.cmp(v:str, b:bat[:str], 
s:bat[:oid]):bat[:bte] ",      "CMDbatCMP;",   "Return -1/0/1 if V </==/> B 
with candidates list"      ]
 [ "batcalc",   "cmp",  "pattern batcalc.cmp(v:str, b:bat[:str], s:bat[:oid], 
r:bat[:bit]):bat[:bte] ", "CMDbatCMP;",   "Return -1/0/1 if V </==/> B with 
candidates list"      ]
+[ "batcalc",   "date", "command batcalc.date(d:bat[:date]):bat[:date] ",       
"MTIMEdate_date_bulk;", ""      ]
+[ "batcalc",   "date", "command batcalc.date(s:bat[:str]):bat[:date] ",        
"MTIMEdate_fromstr_bulk;",      ""      ]
 [ "batcalc",   "date", "command batcalc.date(t:bat[:timestamp]):bat[:date] ",  
"MTIMEtimestamp_extract_date_bulk;",    ""      ]
 [ "batcalc",   "date", "command batcalc.date(v:bat[:oid]):bat[:date] ",        
"batnil_2_date;",       "cast to date"  ]
 [ "batcalc",   "date", "command batcalc.date(v:bat[:oid], 
r:bat[:bit]):bat[:date] ",   "batnil_ce_2_date;",    "cast to date"  ]
 [ "batcalc",   "date", "command batcalc.date(v:bat[:str]):bat[:date] ",        
"batstr_2_date;",       "cast to date"  ]
 [ "batcalc",   "date", "command batcalc.date(v:bat[:str], 
r:bat[:bit]):bat[:date] ",   "batstr_ce_2_date;",    "cast to date"  ]
+[ "batcalc",   "daytime",      "command 
batcalc.daytime(d:bat[:daytime]):bat[:daytime] ",      
"MTIMEdaytime_daytime_bulk;",   ""      ]
 [ "batcalc",   "daytime",      "command 
batcalc.daytime(s:bat[:lng]):bat[:daytime] ",  
"MTIMEdaytime_fromseconds_bulk;",       ""      ]
+[ "batcalc",   "daytime",      "command 
batcalc.daytime(s:bat[:str]):bat[:daytime] ",  "MTIMEdaytime_fromstr_bulk;",   
""      ]
 [ "batcalc",   "daytime",      "command 
batcalc.daytime(t:bat[:timestamp]):bat[:daytime] ",    
"MTIMEtimestamp_extract_daytime_bulk;", ""      ]
 [ "batcalc",   "daytime",      "command batcalc.daytime(v:bat[:daytime], 
digits:int):bat[:daytime] ",  "batdaytime_2time_daytime;",    "cast daytime to 
daytime and check for overflow"        ]
 [ "batcalc",   "daytime",      "command batcalc.daytime(v:bat[:oid], 
digits:int):bat[:daytime] ",      "batnil_2time_daytime;",        "cast to 
daytime and check for overflow"        ]
@@ -15710,6 +15715,8 @@ stdout of test 'MAL-signatures` in direc
 [ "batcalc",   "timestamp",    "command 
batcalc.timestamp(d:bat[:date]):bat[:timestamp] ",     
"MTIMEtimestamp_fromdate_bulk;",        ""      ]
 [ "batcalc",   "timestamp",    "command 
batcalc.timestamp(msecs:bat[:lng]):bat[:timestamp] ",  
"MTIMEtimestamp_frommsec_bulk;",        ""      ]
 [ "batcalc",   "timestamp",    "command 
batcalc.timestamp(secs:bat[:int]):bat[:timestamp] ",   
"MTIMEtimestamp_fromsecond_bulk;",      ""      ]
+[ "batcalc",   "timestamp",    "command 
batcalc.timestamp(s:bat[:str]):bat[:timestamp] ",      
"MTIMEtimestamp_fromstr_bulk;", ""      ]
+[ "batcalc",   "timestamp",    "command 
batcalc.timestamp(t:bat[:timestamp]):bat[:timestamp] ",        
"MTIMEtimestamp_timestamp_bulk;",       ""      ]
 [ "batcalc",   "timestamp",    "command batcalc.timestamp(v:bat[:oid], 
digits:int):bat[:timestamp] ",  "batnil_2time_timestamp;",      "cast to 
timestamp and check for overflow"      ]
 [ "batcalc",   "timestamp",    "command batcalc.timestamp(v:bat[:oid], 
digits:int, r:bat[:BAT]):bat[:timestamp] ",     "batnil_ce_2time_timestamp;",   
"cast to timestamp and check for overflow"      ]
 [ "batcalc",   "timestamp",    "command batcalc.timestamp(v:bat[:str], 
digits:int):bat[:timestamp] ",  "batstr_2time_timestamp;",      "cast to 
timestamp and check for overflow"      ]
@@ -16100,31 +16107,53 @@ stdout of test 'MAL-signatures` in direc
 [ "batmmath",  "tanh", "pattern batmmath.tanh(x:bat[:flt], s:bat[:oid], 
r:bat[:bit]):bat[:flt] ",      "CMDscience_bat_tanh;", ""      ]
 [ "batmtime",  "addmonths",    "command batmtime.addmonths(value:bat[:date], 
months:bat[:int]):bat[:date] ",   "MTIMEdate_addmonths_bulk;",    ""      ]
 [ "batmtime",  "century",      "command 
batmtime.century(d:bat[:date]):bat[:int] ",    
"MTIMEdate_extract_century_bulk;",      ""      ]
+[ "batmtime",  "century",      "command 
batmtime.century(t:bat[:timestamp]):bat[:int] ",       
"MTIMEtimestamp_century_bulk;", ""      ]
 [ "batmtime",  "date_add_msec_interval",       "command 
batmtime.date_add_msec_interval(t:bat[:date], ms:bat[:lng]):bat[:date] ",      
"MTIMEdate_add_msec_interval_bulk;",    ""      ]
 [ "batmtime",  "date_sub_month_interval",      "command 
batmtime.date_sub_month_interval(value:bat[:date], months:bat[:int]):bat[:date] 
",     "MTIMEdate_submonths_bulk;",    ""      ]
 [ "batmtime",  "date_sub_msec_interval",       "command 
batmtime.date_sub_msec_interval(t:bat[:date], ms:bat[:lng]):bat[:date] ",      
"MTIMEdate_sub_msec_interval_bulk;",    ""      ]
+[ "batmtime",  "date_to_str",  "command batmtime.date_to_str(d:bat[:str], 
format:bat[:str]):bat[:str] ",       "MTIMEdate_to_str_bulk;",       ""      ]
 [ "batmtime",  "day",  "command batmtime.day(d:bat[:date]):bat[:int] ",        
"MTIMEdate_extract_day_bulk;",  ""      ]
+[ "batmtime",  "day",  "command batmtime.day(msecs:bat[:lng]):bat[:lng] ",     
"MTIMEsql_day_bulk;",   ""      ]
+[ "batmtime",  "day",  "command batmtime.day(t:bat[:timestamp]):bat[:int] ",   
"MTIMEtimestamp_day_bulk;",     ""      ]
 [ "batmtime",  "dayofweek",    "command 
batmtime.dayofweek(d:bat[:date]):bat[:int] ",  
"MTIMEdate_extract_dayofweek_bulk;",    ""      ]
 [ "batmtime",  "dayofyear",    "command 
batmtime.dayofyear(d:bat[:date]):bat[:int] ",  
"MTIMEdate_extract_dayofyear_bulk;",    ""      ]
 [ "batmtime",  "decade",       "command 
batmtime.decade(d:bat[:date]):bat[:int] ",     
"MTIMEdate_extract_decade_bulk;",       ""      ]
+[ "batmtime",  "decade",       "command 
batmtime.decade(t:bat[:timestamp]):bat[:int] ",        
"MTIMEtimestamp_decade_bulk;",  ""      ]
 [ "batmtime",  "diff", "command batmtime.diff(b1:bat[:date], 
b2:bat[:date]):bat[:int] ",       "MTIMEdate_diff_bulk;", "Difference of two 
sets of date."       ]
-[ "batmtime",  "diff", "command batmtime.diff(val1:bat[:date], 
val2:bat[:date]):bat[:int] ",   "MTIMEdate_diff_bulk;", "returns the number of 
days\n\tbetween 'val1' and 'val2'."      ]
 [ "batmtime",  "diff", "command batmtime.diff(b1:bat[:daytime], 
b2:bat[:daytime]):bat[:lng] ", "MTIMEdaytime_diff_msec_bulk;", "Difference of 
two sets of daytime."    ]
 [ "batmtime",  "diff", "command batmtime.diff(b1:bat[:timestamp], 
b2:bat[:timestamp]):bat[:lng] ",     "MTIMEtimestamp_diff_msec_bulk;",       
"Difference of two sets of timestamp."  ]
+[ "batmtime",  "epoch",        "command 
batmtime.epoch(t:bat[:timestamp]):bat[:int] ", 
"MTIMEseconds_since_epoch_bulk;",       ""      ]
+[ "batmtime",  "epoch",        "command 
batmtime.epoch(t:bat[:lng]):bat[:timestamp] ", "MTIMEtimestamp_frommsec_bulk;", 
       ""      ]
+[ "batmtime",  "epoch",        "command 
batmtime.epoch(t:bat[:int]):bat[:timestamp] ", 
"MTIMEtimestamp_fromsecond_bulk;",      ""      ]
 [ "batmtime",  "hours",        "command 
batmtime.hours(d:bat[:daytime]):bat[:int] ",   
"MTIMEdaytime_extract_hours_bulk;",     ""      ]
+[ "batmtime",  "hours",        "command 
batmtime.hours(msecs:bat[:lng]):bat[:int] ",   "MTIMEsql_hours_bulk;", ""      ]
+[ "batmtime",  "hours",        "command 
batmtime.hours(t:bat[:timestamp]):bat[:int] ", "MTIMEtimestamp_hours_bulk;",   
""      ]
 [ "batmtime",  "minutes",      "command 
batmtime.minutes(d:bat[:daytime]):bat[:int] ", 
"MTIMEdaytime_extract_minutes_bulk;",   ""      ]
+[ "batmtime",  "minutes",      "command 
batmtime.minutes(msecs:bat[:lng]):bat[:int] ", "MTIMEsql_minutes_bulk;",       
""      ]
+[ "batmtime",  "minutes",      "command 
batmtime.minutes(t:bat[:timestamp]):bat[:int] ",       
"MTIMEtimestamp_minutes_bulk;", ""      ]
 [ "batmtime",  "month",        "command batmtime.month(d:bat[:date]):bat[:int] 
",      "MTIMEdate_extract_month_bulk;",        ""      ]
+[ "batmtime",  "month",        "command 
batmtime.month(months:bat[:int]):bat[:int] ",  "MTIMEsql_month_bulk;", ""      ]
+[ "batmtime",  "month",        "command 
batmtime.month(t:bat[:timestamp]):bat[:int] ", "MTIMEtimestamp_month_bulk;",   
""      ]
 [ "batmtime",  "quarter",      "command 
batmtime.quarter(d:bat[:date]):bat[:int] ",    
"MTIMEdate_extract_quarter_bulk;",      ""      ]
+[ "batmtime",  "quarter",      "command 
batmtime.quarter(t:bat[:timestamp]):bat[:int] ",       
"MTIMEtimestamp_quarter_bulk;", ""      ]
+[ "batmtime",  "seconds",      "command 
batmtime.seconds(msecs:bat[:lng]):bat[:int] ", "MTIMEsql_seconds_bulk;",       
""      ]
 [ "batmtime",  "sql_seconds",  "command 
batmtime.sql_seconds(d:bat[:daytime]):bat[:int] ",     
"MTIMEdaytime_extract_sql_seconds_bulk;",       ""      ]
 [ "batmtime",  "sql_seconds",  "command 
batmtime.sql_seconds(d:bat[:timestamp]):bat[:int] ",   
"MTIMEtimestamp_sql_seconds_bulk;",     ""      ]
+[ "batmtime",  "str_to_date",  "command batmtime.str_to_date(s:bat[:str], 
format:bat[:str]):bat[:date] ",      "MTIMEstr_to_date_bulk;",       ""      ]
+[ "batmtime",  "str_to_time",  "command batmtime.str_to_time(s:bat[:str], 
format:bat[:str]):bat[:daytime] ",   "MTIMEstr_to_time_bulk;",       ""      ]
+[ "batmtime",  "str_to_timestamp",     "command 
batmtime.str_to_timestamp(d:bat[:str], format:bat[:str]):bat[:timestamp] ",    
"MTIMEstr_to_timestamp_bulk;",  ""      ]
 [ "batmtime",  "time_add_msec_interval",       "command 
batmtime.time_add_msec_interval(t:bat[:daytime], ms:bat[:lng]):bat[:daytime] ", 
       "MTIMEtime_add_msec_interval_bulk;",    ""      ]
 [ "batmtime",  "time_sub_msec_interval",       "command 
batmtime.time_sub_msec_interval(t:bat[:daytime], ms:bat[:lng]):bat[:daytime] ", 
       "MTIMEtime_sub_msec_interval_bulk;",    ""      ]
+[ "batmtime",  "time_to_str",  "command batmtime.time_to_str(d:bat[:daytime], 
format:bat[:str]):bat[:str] ",   "MTIMEtime_to_str_bulk;",       ""      ]
 [ "batmtime",  "timestamp_add_month_interval", "command 
batmtime.timestamp_add_month_interval(t:bat[:timestamp], 
s:bat[:int]):bat[:timestamp] ",       
"MTIMEtimestamp_add_month_interval_bulk;",      ""      ]
 [ "batmtime",  "timestamp_add_msec_interval",  "command 
batmtime.timestamp_add_msec_interval(t:bat[:timestamp], 
ms:bat[:lng]):bat[:timestamp] ",       
"MTIMEtimestamp_add_msec_interval_bulk;",       ""      ]
 [ "batmtime",  "timestamp_sub_month_interval", "command 
batmtime.timestamp_sub_month_interval(t:bat[:timestamp], 
s:bat[:int]):bat[:timestamp] ",       
"MTIMEtimestamp_sub_month_interval_bulk;",      ""      ]
 [ "batmtime",  "timestamp_sub_msec_interval",  "command 
batmtime.timestamp_sub_msec_interval(t:bat[:timestamp], 
ms:bat[:lng]):bat[:timestamp] ",       
"MTIMEtimestamp_sub_msec_interval_bulk;",       ""      ]
+[ "batmtime",  "timestamp_to_str",     "command 
batmtime.timestamp_to_str(d:bat[:timestamp], format:bat[:str]):bat[:str] ",    
"MTIMEtimestamp_to_str_bulk;",  ""      ]
 [ "batmtime",  "weekofyear",   "command 
batmtime.weekofyear(d:bat[:date]):bat[:int] ", 
"MTIMEdate_extract_weekofyear_bulk;",   ""      ]
 [ "batmtime",  "year", "command batmtime.year(d:bat[:date]):bat[:int] ",       
"MTIMEdate_extract_year_bulk;", ""      ]
+[ "batmtime",  "year", "command batmtime.year(months:bat[:int]):bat[:int] ",   
"MTIMEsql_year_bulk;",  ""      ]
+[ "batmtime",  "year", "command batmtime.year(t:bat[:timestamp]):bat[:int] ",  
"MTIMEtimestamp_year_bulk;",    ""      ]
 [ "batpcre",   "replace",      "command batpcre.replace(orig:bat[:str], 
pat:str, repl:str, flag:str):bat[:str] ",      "PCREreplace_bat_wrap;",        
""      ]
 [ "batpcre",   "replace_first",        "command 
batpcre.replace_first(orig:bat[:str], pat:str, repl:str, flag:str):bat[:str] ", 
       "PCREreplacefirst_bat_wrap;",   ""      ]
 [ "batpyapi3", "eval", "unsafe pattern batpyapi3.eval(fptr:ptr, expr:str, 
arg:any...):any... ",        "PYAPI3PyAPIevalStd;",  "Execute a simple Python 
script value"  ]
diff --git 
a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out 
b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
--- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
+++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
@@ -63,7 +63,7 @@ stdout of test 'opt_sql_append` in direc
 function user.s10_0():void;
     X_1:void := querylog.define("explain copy into ttt from 
\\'/tmp/xyz\\';":str, "sequential_pipe":str, 22:int);
     X_4:int := sql.mvc();
-    (X_25:bat[:int], X_26:bat[:int], X_27:bat[:int]) := 
sql.copy_from(0x7f0dec1ace80:ptr, "|":str, "\n":str, nil:str, "null":str, 
"/tmp/xyz":str, -1:lng, 0:lng, 0:int, nil:str, 0:int);
+    (X_25:bat[:int], X_26:bat[:int], X_27:bat[:int]) := 
sql.copy_from(0x7f75841ad000:ptr, "|":str, "\n":str, nil:str, "null":str, 
"/tmp/xyz":str, -1:lng, 0:lng, 0:int, nil:str, 0:int);
     X_28:lng := aggr.count(X_25:bat[:int]);
     X_29:lng := sql.claim(X_4:int, "sys":str, "ttt":str, X_28:lng);
     X_33:int := sql.append(X_4:int, "sys":str, "ttt":str, 
"averylongcolumnnametomakeitlargeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee":str,
 X_29:lng, X_25:bat[:int]);
@@ -79,30 +79,30 @@ end user.s10_0;
 #evaluate             actions= 0 time=2 usec 
 #emptybind            actions= 0 time=4 usec 
 #pushselect           actions= 0 time=3 usec 
-#aliases              actions= 0 time=4 usec 
-#mitosis              actions= 0 time=2 usec 
-#mergetable           actions= 0 time=17 usec 
-#deadcode             actions= 0 time=5 usec 
-#aliases              actions= 0 time=4 usec 
-#constants            actions= 0 time=5 usec 
-#commonTerms          actions= 0 time=4 usec 
-#projectionpath       actions= 0 time=3 usec 
-#deadcode             actions= 0 time=4 usec 
-#reorder              actions= 1 time=19 usec 
-#reduce               actions=33 time=23 usec 
-#matpack              actions= 0 time=3 usec 
-#dataflow             actions=31 time=20 usec 
-#querylog             actions= 0 time=0 usec 
-#multiplex            actions= 0 time=3 usec 
-#generator            actions= 0 time=1 usec 
-#profiler             actions= 1 time=6 usec 
-#garbageCollector     actions= 1 time=13 usec 
-#total                actions= 1 time=245 usec 
-#declare opt_pipe_name string;
-#set opt_pipe_name = ( select optimizer );
-#declare opt_pipe_def  string;
-#set opt_pipe_def  = ( select def from optimizers() where name = opt_pipe_name 
);
-#set optimizer = 
substring(opt_pipe_def,0,length(opt_pipe_def)-length('optimizer.garbageCollector();'))
 || 'optimizer.sql_append();optimizer.garbageCollector();';
+#aliases              actions= 0 time=0 usec 
+#mergetable           actions= 0 time=10 usec 
+#deadcode             actions= 0 time=2 usec 
+#aliases              actions= 0 time=0 usec 
+#constants            actions= 0 time=3 usec 
+#commonTerms          actions= 0 time=1 usec 
+#projectionpath       actions= 0 time=1 usec 
+#deadcode             actions= 0 time=2 usec 
+#reorder              actions= 1 time=7 usec 
+#matpack              actions= 0 time=0 usec 
+#multiplex            actions= 0 time=1 usec 
+#profiler             actions= 1 time=1 usec 
+#candidates           actions= 1 time=0 usec 
+#deadcode             actions= 0 time=2 usec 
+#postfix              actions= 0 time=1 usec 
+#wlc                  actions= 0 time=0 usec 
+#garbagecollector     actions= 1 time=13 usec 
+#total                actions=27 time=96 usec 
+#start transaction;
+#create local temp table "opt_pipe_name" ("opt_pipe_name" string);
+#insert into "opt_pipe_name" values ((select optimizer));
+[ 1    ]
+#set optimizer = substring((select def from optimizers() where name = (select 
opt_pipe_name from "opt_pipe_name")),0,
+#                length((select def from optimizers() where name = (select 
opt_pipe_name from "opt_pipe_name")))-length('optimizer.garbageCollector();')) 
|| 'optimizer.sql_append();optimizer.garbageCollector();';
 #select optimizer;
 % .%2 # table_name
 % %2 # name
@@ -120,45 +120,44 @@ end user.s10_0;
 % mal # name
 % clob # type
 % 245 # length
-function user.s26_0():void;
+function user.s22_0():void;
     X_1:void := querylog.define("explain copy into ttt from 
\\'/tmp/xyz\\';":str, "user_0":str, 22:int);
     X_4:int := sql.mvc();
-    (X_25:bat[:int], X_26:bat[:int], X_27:bat[:int]) := 
sql.copy_from(0x7f0dec1ace80:ptr, "|":str, "\n":str, nil:str, "null":str, 
"/tmp/xyz":str, -1:lng, 0:lng, 0:int, nil:str, 0:int);
+    (X_25:bat[:int], X_26:bat[:int], X_27:bat[:int]) := 
sql.copy_from(0x7f75841ad000:ptr, "|":str, "\n":str, nil:str, "null":str, 
"/tmp/xyz":str, -1:lng, 0:lng, 0:int, nil:str, 0:int);
     X_28:lng := aggr.count(X_25:bat[:int]);
     X_29:lng := sql.claim(X_4:int, "sys":str, "ttt":str, X_28:lng);
     X_33:int := sql.append(X_4:int, "sys":str, "ttt":str, 
"averylongcolumnnametomakeitlargeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee":str,
 X_29:lng, X_25:bat[:int]);
     X_36:int := sql.append(X_33:int, "sys":str, "ttt":str, "b":str, X_29:lng, 
X_26:bat[:int]);
     X_39:int := sql.append(X_36:int, "sys":str, "ttt":str, "c":str, X_29:lng, 
X_27:bat[:int]);
     sql.affectedRows(X_39:int, X_28:lng);
-end user.s26_0;
-#inline               actions= 0 time=1 usec 
-#candidates           actions= 1 time=14 usec 
-#remap                actions= 0 time=3 usec 
-#costModel            actions= 1 time=13 usec 
-#coercions            actions=10 time=14 usec 
-#evaluate             actions= 0 time=3 usec 
-#emptybind            actions= 0 time=3 usec 
-#pushselect           actions= 0 time=3 usec 
-#aliases              actions= 0 time=4 usec 
-#mitosis              actions= 0 time=2 usec 
-#mergetable           actions= 0 time=16 usec 
-#deadcode             actions= 0 time=4 usec 
-#aliases              actions= 0 time=4 usec 
-#constants            actions= 0 time=4 usec 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to