Changeset: c7aa814853b1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c7aa814853b1
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
        monetdb5/modules/atoms/mtime.mal
Branch: default
Log Message:

Approved output; added missing bulk version of batmtime.diff.


diffs (122 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" ]
@@ -11308,10 +11308,18 @@ stdout of test 'MAL-signatures` in direc
 [ "batmmath",  "tanh", "pattern batmmath.tanh(x:bat[:flt], 
r:bat[:bit]):bat[:flt] ",   "CMDscience_bat_tanh;", ""      ]
 [ "batmmath",  "tanh", "pattern batmmath.tanh(x:bat[:flt], 
s:bat[:oid]):bat[:flt] ",   "CMDscience_bat_tanh;", ""      ]
 [ "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",  "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",  "day",  "command batmtime.day(d:bat[:date]):bat[:int] ",        
"MTIMEdate_extract_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",  "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",  "hours",        "command 
batmtime.hours(d:bat[:daytime]):bat[:int] ",   
"MTIMEdaytime_extract_hours_bulk;",     ""      ]
 [ "batmtime",  "minutes",      "command 
batmtime.minutes(d:bat[:daytime]):bat[:int] ", 
"MTIMEdaytime_extract_minutes_bulk;",   ""      ]
@@ -11319,8 +11327,13 @@ stdout of test 'MAL-signatures` in direc
 [ "batmtime",  "quarter",      "command 
batmtime.quarter(d:bat[:date]):bat[:int] ",    
"MTIMEdate_extract_quarter_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",  "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",  "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",  "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;", ""      ]
 [ "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;",   ""      ]
@@ -13865,7 +13878,7 @@ stdout of test 'MAL-signatures` in direc
 [ "mtime",     "current_time", "command mtime.current_time():daytime ",        
"MTIMEcurrent_time;",   ""      ]
 [ "mtime",     "current_timestamp",    "command 
mtime.current_timestamp():timestamp ", "MTIMEcurrent_timestamp;",      ""      ]
 [ "mtime",     "date_add_msec_interval",       "command 
mtime.date_add_msec_interval(t:date, ms:lng):date ",   
"MTIMEdate_add_msec_interval;", ""      ]
-[ "mtime",     "date_sub_month_interval",      "command 
mtime.date_sub_month_interval(t:date, s:int):date ",   "MTIMEdate_submonths;", 
"Subtract months from a date"   ]
+[ "mtime",     "date_sub_month_interval",      "command 
mtime.date_sub_month_interval(t:date, months:int):date ",      
"MTIMEdate_submonths;", "Subtract months from a date"   ]
 [ "mtime",     "date_sub_msec_interval",       "command 
mtime.date_sub_msec_interval(t:date, ms:lng):date ",   
"MTIMEdate_sub_msec_interval;", ""      ]
 [ "mtime",     "date_to_str",  "command mtime.date_to_str(d:date, 
format:str):str ",   "MTIMEdate_to_str;",    "create a string from the date, 
using the specified format (see man strftime)"  ]
 [ "mtime",     "day",  "command mtime.day(d:date):int ",       
"MTIMEdate_extract_day;",       "extracts day from date "       ]
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" ]
@@ -16098,10 +16098,18 @@ stdout of test 'MAL-signatures` in direc
 [ "batmmath",  "tanh", "pattern batmmath.tanh(x:bat[:flt], 
r:bat[:bit]):bat[:flt] ",   "CMDscience_bat_tanh;", ""      ]
 [ "batmmath",  "tanh", "pattern batmmath.tanh(x:bat[:flt], 
s:bat[:oid]):bat[:flt] ",   "CMDscience_bat_tanh;", ""      ]
 [ "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",  "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",  "day",  "command batmtime.day(d:bat[:date]):bat[:int] ",        
"MTIMEdate_extract_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",  "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",  "hours",        "command 
batmtime.hours(d:bat[:daytime]):bat[:int] ",   
"MTIMEdaytime_extract_hours_bulk;",     ""      ]
 [ "batmtime",  "minutes",      "command 
batmtime.minutes(d:bat[:daytime]):bat[:int] ", 
"MTIMEdaytime_extract_minutes_bulk;",   ""      ]
@@ -16109,8 +16117,13 @@ stdout of test 'MAL-signatures` in direc
 [ "batmtime",  "quarter",      "command 
batmtime.quarter(d:bat[:date]):bat[:int] ",    
"MTIMEdate_extract_quarter_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",  "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",  "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",  "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;", ""      ]
 [ "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;",   ""      ]
@@ -19350,7 +19363,7 @@ stdout of test 'MAL-signatures` in direc
 [ "mtime",     "current_time", "command mtime.current_time():daytime ",        
"MTIMEcurrent_time;",   ""      ]
 [ "mtime",     "current_timestamp",    "command 
mtime.current_timestamp():timestamp ", "MTIMEcurrent_timestamp;",      ""      ]
 [ "mtime",     "date_add_msec_interval",       "command 
mtime.date_add_msec_interval(t:date, ms:lng):date ",   
"MTIMEdate_add_msec_interval;", ""      ]
-[ "mtime",     "date_sub_month_interval",      "command 
mtime.date_sub_month_interval(t:date, s:int):date ",   "MTIMEdate_submonths;", 
"Subtract months from a date"   ]
+[ "mtime",     "date_sub_month_interval",      "command 
mtime.date_sub_month_interval(t:date, months:int):date ",      
"MTIMEdate_submonths;", "Subtract months from a date"   ]
 [ "mtime",     "date_sub_msec_interval",       "command 
mtime.date_sub_msec_interval(t:date, ms:lng):date ",   
"MTIMEdate_sub_msec_interval;", ""      ]
 [ "mtime",     "date_to_str",  "command mtime.date_to_str(d:date, 
format:str):str ",   "MTIMEdate_to_str;",    "create a string from the date, 
using the specified format (see man strftime)"  ]
 [ "mtime",     "day",  "command mtime.day(d:date):int ",       
"MTIMEdate_extract_day;",       "extracts day from date "       ]
diff --git a/monetdb5/modules/atoms/mtime.mal b/monetdb5/modules/atoms/mtime.mal
--- a/monetdb5/modules/atoms/mtime.mal
+++ b/monetdb5/modules/atoms/mtime.mal
@@ -399,6 +399,10 @@ command diff(val1:date, val2:date) :int
 address MTIMEdate_diff
 comment "returns the number of days
        between 'val1' and 'val2'.";
+command batmtime.diff(val1:bat[:date], val2:bat[:date]) :bat[:int]
+address MTIMEdate_diff_bulk
+comment "returns the number of days
+       between 'val1' and 'val2'.";
 
 command dayofyear(d:date) :int
 address MTIMEdate_extract_dayofyear
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to