Changeset: 8f30a71e9472 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8f30a71e9472
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
        clients/Tests/exports.stable.out
        gdk/gdk_analytic_func.c
        sql/test/Tests/systemfunctions.stable.out
        sql/test/Tests/systemfunctions.stable.out.int128
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.32bit
        sql/test/emptydb/Tests/check.stable.out.int128
Branch: analytics
Log Message:

Tests approval.


diffs (truncated from 331 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
@@ -8394,7 +8394,7 @@ Ready.
 [ "batsql",    "dense_rank",   "pattern batsql.dense_rank(b:bat[:any_1], 
p:any_2, o:any_3):bat[:int] ",        "SQLdense_rank;",       "return the 
densely ranked groups"      ]
 [ "batsql",    "diff", "pattern batsql.diff(b:bat[:any_1]):bat[:bit] ",        
"SQLdiff;",     "return true if cur != prev row"        ]
 [ "batsql",    "diff", "pattern batsql.diff(p:bat[:bit], 
b:bat[:any_1]):bat[:bit] ",   "SQLdiff;",     "return true if cur != prev row"  
      ]
-[ "batsql",    "first_value",  "pattern batsql.first_value(b:bat[:any_1], 
p:any_2, o:any_3):bat[:any_1] ",     "SQLfirst_value;",      "return the first 
value of groups"      ]
+[ "batsql",    "first_value",  "pattern batsql.first_value(b:bat[:any_1], 
s:bat[:lng], e:bat[:lng]):bat[:any_1] ",     "SQLfirst_value;",      "return 
the first value of groups"      ]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:any_2, d:any_1, 
p:any_3, o:any_4):bat[:any_1] ",   "SQLlag;",      "return the value in the 
previous 'l' row in the partition or 'd' if non existent"      ]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:any_2, 
d:bat[:any_1], p:any_3, o:any_4):bat[:any_1] ",     "SQLlag;",      "return the 
value in the previous 'l' row in the partition or 'd' if non existent"      ]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:any_2, p:any_3, 
o:any_4):bat[:any_1] ",    "SQLlag;",      "return the value in the previous 
'l' row in the partition or NULL if non existent"     ]
@@ -8402,7 +8402,7 @@ Ready.
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:bat[:any_2], 
d:bat[:any_1], p:any_3, o:any_4):bat[:any_1] ",       "SQLlag;",      "return 
the value in the previous 'l' row in the partition or 'd' if non existent"      
]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:bat[:any_2], 
p:any_3, o:any_4):bat[:any_1] ",      "SQLlag;",      "return the value in the 
previous 'l' row in the partition or NULL if non existent"     ]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], p:any_3, 
o:any_4):bat[:any_1] ",     "SQLlag;",      "return the value in the previous 
row in the partition or NULL if non existent" ]
-[ "batsql",    "last_value",   "pattern batsql.last_value(b:bat[:any_1], 
p:any_2, o:any_3):bat[:any_1] ",      "SQLlast_value;",       "return the last 
value of groups"       ]
+[ "batsql",    "last_value",   "pattern batsql.last_value(b:bat[:any_1], 
s:bat[:lng], e:bat[:lng]):bat[:any_1] ",      "SQLlast_value;",       "return 
the last value of groups"       ]
 [ "batsql",    "lead", "pattern batsql.lead(b:bat[:any_1], l:any_2, d:any_1, 
p:any_3, o:any_4):bat[:any_1] ",  "SQLlead;",     "return the value in the next 
'l' row in the partition or 'd' if non existent"  ]
 [ "batsql",    "lead", "pattern batsql.lead(b:bat[:any_1], l:any_2, 
d:bat[:any_1], p:any_3, o:any_4):bat[:any_1] ",    "SQLlead;",     "return the 
value in the next 'l' row in the partition or 'd' if non existent"  ]
 [ "batsql",    "lead", "pattern batsql.lead(b:bat[:any_1], l:any_2, p:any_3, 
o:any_4):bat[:any_1] ",   "SQLlead;",     "return the value in the next 'l' row 
in the partition or NULL if non existent" ]
@@ -8413,8 +8413,8 @@ Ready.
 [ "batsql",    "max",  "pattern batsql.max(b:bat[:any_1], s:bat[:lng], 
e:bat[:lng]):bat[:any_1] ",     "SQLmax;",      "return the maximum of groups"  
]
 [ "batsql",    "min",  "pattern batsql.min(b:bat[:any_1], s:bat[:lng], 
e:bat[:lng]):bat[:any_1] ",     "SQLmin;",      "return the minimum of groups"  
]
 [ "batsql",    "next_value",   "pattern batsql.next_value(sname:bat[:str], 
sequence:str):bat[:lng] ",  "mvc_bat_next_value;",  "return the next value of 
the sequence" ]
-[ "batsql",    "nth_value",    "pattern batsql.nth_value(b:bat[:any_1], 
n:any_2, p:any_3, o:any_4):bat[:any_1] ",      "SQLnth_value;",        "return 
the nth value of each group"    ]
-[ "batsql",    "nth_value",    "pattern batsql.nth_value(b:bat[:any_1], 
n:bat[:any_2], p:any_3, o:any_4):bat[:any_1] ",        "SQLnth_value;",        
"return the nth value of each group"    ]
+[ "batsql",    "nth_value",    "pattern batsql.nth_value(b:bat[:any_1], 
n:any_2, s:bat[:lng], e:bat[:lng]):bat[:any_1] ",      "SQLnth_value;",        
"return the nth value of each group"    ]
+[ "batsql",    "nth_value",    "pattern batsql.nth_value(b:bat[:any_1], 
n:bat[:any_2], s:bat[:lng], e:bat[:lng]):bat[:any_1] ",        "SQLnth_value;", 
       "return the nth value of each group"    ]
 [ "batsql",    "ntile",        "pattern batsql.ntile(b:bat[:any_1], n:any_2, 
p:any_3, o:any_4):bat[:any_2] ",  "SQLntile;",    "return the groups divided as 
equally as possible"      ]
 [ "batsql",    "ntile",        "pattern batsql.ntile(b:bat[:any_1], 
n:bat[:any_2], p:any_3, o:any_4):bat[:any_2] ",    "SQLntile;",    "return the 
groups divided as equally as possible"      ]
 [ "batsql",    "password",     "pattern 
batsql.password(user:bat[:str]):bat[:str] ",   "db_password_wrap;",    "Return 
password hash of user"  ]
@@ -11073,7 +11073,7 @@ Ready.
 [ "sql",       "exportResult", "pattern sql.exportResult(s:streams, 
res_id:int):void ",        "mvc_export_result_wrap;",      "Export a result (in 
order) to stream s"        ]
 [ "sql",       "export_table", "pattern sql.export_table(fname:str, fmt:str, 
colsep:str, recsep:str, qout:str, nullrep:str, tbl:bat[:str], attr:bat[:str], 
tpe:bat[:str], len:bat[:int], scale:bat[:int], cols:any...):int ",  
"mvc_export_row_wrap;", "Prepare a table result set for the COPY INTO stream"   
]
 [ "sql",       "export_table", "pattern sql.export_table(fname:str, fmt:str, 
colsep:str, recsep:str, qout:str, nullrep:str, tbl:bat[:str], attr:bat[:str], 
tpe:bat[:str], len:bat[:int], scale:bat[:int], cols:bat[:any]...):int ",    
"mvc_export_table_wrap;",       "Prepare a table result set for the COPY INTO 
stream"   ]
-[ "sql",       "first_value",  "pattern sql.first_value(b:any_1, p:bit, 
o:bit):any_1 ",        "SQLfirst_value;",      "return the first value of 
groups"      ]
+[ "sql",       "first_value",  "pattern sql.first_value(b:any_1, s:lng, 
e:lng):any_1 ",        "SQLfirst_value;",      "return the first value of 
groups"      ]
 [ "sql",       "flush_log",    "command sql.flush_log():void ",        
"SQLflush_log;",        "flush the log now"     ]
 [ "sql",       "getVariable",  "pattern sql.getVariable(mvc:int, 
varname:str):any_1 ", "getVariable;", "Get the value of a session variable"   ]
 [ "sql",       "getVersion",   "command sql.getVersion(clientid:int):lng ",    
"mvc_getVersion;",      "Return the database version identifier for a client."  
]
@@ -11089,7 +11089,7 @@ Ready.
 [ "sql",       "lag",  "pattern sql.lag(b:any_1, l:bat[:any_2], d:bat[:any_1], 
p:any_3, o:any_4):any_1 ",      "SQLlag;",      "return the value in the 
previous 'l' row in the partition or 'd' if non existent"      ]
 [ "sql",       "lag",  "pattern sql.lag(b:any_1, l:bat[:any_2], p:any_3, 
o:any_4):any_1 ",     "SQLlag;",      "return the value in the previous 'l' row 
in the partition or NULL if non existent"     ]
 [ "sql",       "lag",  "pattern sql.lag(b:any_1, p:any_3, o:any_4):any_1 ",    
"SQLlag;",      "return the value in the previous row in the partition or NULL 
if non existent" ]
-[ "sql",       "last_value",   "pattern sql.last_value(b:any_1, p:bit, 
o:bit):any_1 ", "SQLlast_value;",       "return the last value of groups"       
]
+[ "sql",       "last_value",   "pattern sql.last_value(b:any_1, s:lng, 
e:lng):any_1 ", "SQLlast_value;",       "return the last value of groups"       
]
 [ "sql",       "lead", "pattern sql.lead(b:any_1, l:any_2, d:any_1, p:any_3, 
o:any_4):any_1 ", "SQLlead;",     "return the value in the next 'l' row in the 
partition or 'd' if non existent"  ]
 [ "sql",       "lead", "pattern sql.lead(b:any_1, l:any_2, d:bat[:any_1], 
p:any_3, o:any_4):any_1 ",   "SQLlead;",     "return the value in the next 'l' 
row in the partition or 'd' if non existent"  ]
 [ "sql",       "lead", "pattern sql.lead(b:any_1, l:any_2, p:any_3, 
o:any_4):any_1 ",  "SQLlead;",     "return the value in the next 'l' row in the 
partition or NULL if non existent" ]
@@ -11105,8 +11105,8 @@ Ready.
 [ "sql",       "mvc",  "pattern sql.mvc():int ",       "SQLmvc;",      "Get 
the multiversion catalog context. \nNeeded for correct statement 
dependencies\n(ie sql.update, should be after sql.bind in concurrent 
execution)"  ]
 [ "sql",       "next_value",   "pattern sql.next_value(sname:str, 
sequence:str):lng ", "mvc_next_value;",      "return the next value of the 
sequence" ]
 [ "sql",       "not_unique",   "command sql.not_unique(b:bat[:oid]):bit ",     
"not_unique;",  "check if the tail sorted bat b doesn't have unique tail 
values"        ]
-[ "sql",       "nth_value",    "pattern sql.nth_value(b:any_1, n:any_2, 
p:any_3, o:any_4):any_1 ",     "SQLnth_value;",        "return the nth value of 
each group"    ]
-[ "sql",       "nth_value",    "pattern sql.nth_value(b:any_1, n:bat[:any_2], 
p:any_3, o:any_4):any_1 ",       "SQLnth_value;",        "return the nth value 
of each group"    ]
+[ "sql",       "nth_value",    "pattern sql.nth_value(b:any_1, n:any_2, s:lng, 
e:lng):any_1 ", "SQLnth_value;",        "return the nth value of each group"    
]
+[ "sql",       "nth_value",    "pattern sql.nth_value(b:any_1, n:bat[:any_2], 
s:lng, e:lng):any_1 ",   "SQLnth_value;",        "return the nth value of each 
group"    ]
 [ "sql",       "ntile",        "pattern sql.ntile(b:any_1, n:any_2, p:any_3, 
o:any_4):any_2 ", "SQLntile;",    "return the groups divided as equally as 
possible"      ]
 [ "sql",       "ntile",        "pattern sql.ntile(b:any_1, n:bat[:any_2], 
p:any_3, o:any_4):any_2 ",   "SQLntile;",    "return the groups divided as 
equally as possible"      ]
 [ "sql",       "optimizer_updates",    "pattern sql.optimizer_updates():void 
",        "SQLoptimizersUpdate;", ""      ]
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
@@ -11968,7 +11968,7 @@ Ready.
 [ "batsql",    "dense_rank",   "pattern batsql.dense_rank(b:bat[:any_1], 
p:any_2, o:any_3):bat[:int] ",        "SQLdense_rank;",       "return the 
densely ranked groups"      ]
 [ "batsql",    "diff", "pattern batsql.diff(b:bat[:any_1]):bat[:bit] ",        
"SQLdiff;",     "return true if cur != prev row"        ]
 [ "batsql",    "diff", "pattern batsql.diff(p:bat[:bit], 
b:bat[:any_1]):bat[:bit] ",   "SQLdiff;",     "return true if cur != prev row"  
      ]
-[ "batsql",    "first_value",  "pattern batsql.first_value(b:bat[:any_1], 
p:any_2, o:any_3):bat[:any_1] ",     "SQLfirst_value;",      "return the first 
value of groups"      ]
+[ "batsql",    "first_value",  "pattern batsql.first_value(b:bat[:any_1], 
s:bat[:lng], e:bat[:lng]):bat[:any_1] ",     "SQLfirst_value;",      "return 
the first value of groups"      ]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:any_2, d:any_1, 
p:any_3, o:any_4):bat[:any_1] ",   "SQLlag;",      "return the value in the 
previous 'l' row in the partition or 'd' if non existent"      ]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:any_2, 
d:bat[:any_1], p:any_3, o:any_4):bat[:any_1] ",     "SQLlag;",      "return the 
value in the previous 'l' row in the partition or 'd' if non existent"      ]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:any_2, p:any_3, 
o:any_4):bat[:any_1] ",    "SQLlag;",      "return the value in the previous 
'l' row in the partition or NULL if non existent"     ]
@@ -11976,7 +11976,7 @@ Ready.
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:bat[:any_2], 
d:bat[:any_1], p:any_3, o:any_4):bat[:any_1] ",       "SQLlag;",      "return 
the value in the previous 'l' row in the partition or 'd' if non existent"      
]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], l:bat[:any_2], 
p:any_3, o:any_4):bat[:any_1] ",      "SQLlag;",      "return the value in the 
previous 'l' row in the partition or NULL if non existent"     ]
 [ "batsql",    "lag",  "pattern batsql.lag(b:bat[:any_1], p:any_3, 
o:any_4):bat[:any_1] ",     "SQLlag;",      "return the value in the previous 
row in the partition or NULL if non existent" ]
-[ "batsql",    "last_value",   "pattern batsql.last_value(b:bat[:any_1], 
p:any_2, o:any_3):bat[:any_1] ",      "SQLlast_value;",       "return the last 
value of groups"       ]
+[ "batsql",    "last_value",   "pattern batsql.last_value(b:bat[:any_1], 
s:bat[:lng], e:bat[:lng]):bat[:any_1] ",      "SQLlast_value;",       "return 
the last value of groups"       ]
 [ "batsql",    "lead", "pattern batsql.lead(b:bat[:any_1], l:any_2, d:any_1, 
p:any_3, o:any_4):bat[:any_1] ",  "SQLlead;",     "return the value in the next 
'l' row in the partition or 'd' if non existent"  ]
 [ "batsql",    "lead", "pattern batsql.lead(b:bat[:any_1], l:any_2, 
d:bat[:any_1], p:any_3, o:any_4):bat[:any_1] ",    "SQLlead;",     "return the 
value in the next 'l' row in the partition or 'd' if non existent"  ]
 [ "batsql",    "lead", "pattern batsql.lead(b:bat[:any_1], l:any_2, p:any_3, 
o:any_4):bat[:any_1] ",   "SQLlead;",     "return the value in the next 'l' row 
in the partition or NULL if non existent" ]
@@ -11987,8 +11987,8 @@ Ready.
 [ "batsql",    "max",  "pattern batsql.max(b:bat[:any_1], s:bat[:lng], 
e:bat[:lng]):bat[:any_1] ",     "SQLmax;",      "return the maximum of groups"  
]
 [ "batsql",    "min",  "pattern batsql.min(b:bat[:any_1], s:bat[:lng], 
e:bat[:lng]):bat[:any_1] ",     "SQLmin;",      "return the minimum of groups"  
]
 [ "batsql",    "next_value",   "pattern batsql.next_value(sname:bat[:str], 
sequence:str):bat[:lng] ",  "mvc_bat_next_value;",  "return the next value of 
the sequence" ]
-[ "batsql",    "nth_value",    "pattern batsql.nth_value(b:bat[:any_1], 
n:any_2, p:any_3, o:any_4):bat[:any_1] ",      "SQLnth_value;",        "return 
the nth value of each group"    ]
-[ "batsql",    "nth_value",    "pattern batsql.nth_value(b:bat[:any_1], 
n:bat[:any_2], p:any_3, o:any_4):bat[:any_1] ",        "SQLnth_value;",        
"return the nth value of each group"    ]
+[ "batsql",    "nth_value",    "pattern batsql.nth_value(b:bat[:any_1], 
n:any_2, s:bat[:lng], e:bat[:lng]):bat[:any_1] ",      "SQLnth_value;",        
"return the nth value of each group"    ]
+[ "batsql",    "nth_value",    "pattern batsql.nth_value(b:bat[:any_1], 
n:bat[:any_2], s:bat[:lng], e:bat[:lng]):bat[:any_1] ",        "SQLnth_value;", 
       "return the nth value of each group"    ]
 [ "batsql",    "ntile",        "pattern batsql.ntile(b:bat[:any_1], n:any_2, 
p:any_3, o:any_4):bat[:any_2] ",  "SQLntile;",    "return the groups divided as 
equally as possible"      ]
 [ "batsql",    "ntile",        "pattern batsql.ntile(b:bat[:any_1], 
n:bat[:any_2], p:any_3, o:any_4):bat[:any_2] ",    "SQLntile;",    "return the 
groups divided as equally as possible"      ]
 [ "batsql",    "password",     "pattern 
batsql.password(user:bat[:str]):bat[:str] ",   "db_password_wrap;",    "Return 
password hash of user"  ]
@@ -15309,7 +15309,7 @@ Ready.
 [ "sql",       "exportResult", "pattern sql.exportResult(s:streams, 
res_id:int):void ",        "mvc_export_result_wrap;",      "Export a result (in 
order) to stream s"        ]
 [ "sql",       "export_table", "pattern sql.export_table(fname:str, fmt:str, 
colsep:str, recsep:str, qout:str, nullrep:str, tbl:bat[:str], attr:bat[:str], 
tpe:bat[:str], len:bat[:int], scale:bat[:int], cols:any...):int ",  
"mvc_export_row_wrap;", "Prepare a table result set for the COPY INTO stream"   
]
 [ "sql",       "export_table", "pattern sql.export_table(fname:str, fmt:str, 
colsep:str, recsep:str, qout:str, nullrep:str, tbl:bat[:str], attr:bat[:str], 
tpe:bat[:str], len:bat[:int], scale:bat[:int], cols:bat[:any]...):int ",    
"mvc_export_table_wrap;",       "Prepare a table result set for the COPY INTO 
stream"   ]
-[ "sql",       "first_value",  "pattern sql.first_value(b:any_1, p:bit, 
o:bit):any_1 ",        "SQLfirst_value;",      "return the first value of 
groups"      ]
+[ "sql",       "first_value",  "pattern sql.first_value(b:any_1, s:lng, 
e:lng):any_1 ",        "SQLfirst_value;",      "return the first value of 
groups"      ]
 [ "sql",       "flush_log",    "command sql.flush_log():void ",        
"SQLflush_log;",        "flush the log now"     ]
 [ "sql",       "getVariable",  "pattern sql.getVariable(mvc:int, 
varname:str):any_1 ", "getVariable;", "Get the value of a session variable"   ]
 [ "sql",       "getVersion",   "command sql.getVersion(clientid:int):lng ",    
"mvc_getVersion;",      "Return the database version identifier for a client."  
]
@@ -15325,7 +15325,7 @@ Ready.
 [ "sql",       "lag",  "pattern sql.lag(b:any_1, l:bat[:any_2], d:bat[:any_1], 
p:any_3, o:any_4):any_1 ",      "SQLlag;",      "return the value in the 
previous 'l' row in the partition or 'd' if non existent"      ]
 [ "sql",       "lag",  "pattern sql.lag(b:any_1, l:bat[:any_2], p:any_3, 
o:any_4):any_1 ",     "SQLlag;",      "return the value in the previous 'l' row 
in the partition or NULL if non existent"     ]
 [ "sql",       "lag",  "pattern sql.lag(b:any_1, p:any_3, o:any_4):any_1 ",    
"SQLlag;",      "return the value in the previous row in the partition or NULL 
if non existent" ]
-[ "sql",       "last_value",   "pattern sql.last_value(b:any_1, p:bit, 
o:bit):any_1 ", "SQLlast_value;",       "return the last value of groups"       
]
+[ "sql",       "last_value",   "pattern sql.last_value(b:any_1, s:lng, 
e:lng):any_1 ", "SQLlast_value;",       "return the last value of groups"       
]
 [ "sql",       "lead", "pattern sql.lead(b:any_1, l:any_2, d:any_1, p:any_3, 
o:any_4):any_1 ", "SQLlead;",     "return the value in the next 'l' row in the 
partition or 'd' if non existent"  ]
 [ "sql",       "lead", "pattern sql.lead(b:any_1, l:any_2, d:bat[:any_1], 
p:any_3, o:any_4):any_1 ",   "SQLlead;",     "return the value in the next 'l' 
row in the partition or 'd' if non existent"  ]
 [ "sql",       "lead", "pattern sql.lead(b:any_1, l:any_2, p:any_3, 
o:any_4):any_1 ",  "SQLlead;",     "return the value in the next 'l' row in the 
partition or NULL if non existent" ]
@@ -15341,8 +15341,8 @@ Ready.
 [ "sql",       "mvc",  "pattern sql.mvc():int ",       "SQLmvc;",      "Get 
the multiversion catalog context. \nNeeded for correct statement 
dependencies\n(ie sql.update, should be after sql.bind in concurrent 
execution)"  ]
 [ "sql",       "next_value",   "pattern sql.next_value(sname:str, 
sequence:str):lng ", "mvc_next_value;",      "return the next value of the 
sequence" ]
 [ "sql",       "not_unique",   "command sql.not_unique(b:bat[:oid]):bit ",     
"not_unique;",  "check if the tail sorted bat b doesn't have unique tail 
values"        ]
-[ "sql",       "nth_value",    "pattern sql.nth_value(b:any_1, n:any_2, 
p:any_3, o:any_4):any_1 ",     "SQLnth_value;",        "return the nth value of 
each group"    ]
-[ "sql",       "nth_value",    "pattern sql.nth_value(b:any_1, n:bat[:any_2], 
p:any_3, o:any_4):any_1 ",       "SQLnth_value;",        "return the nth value 
of each group"    ]
+[ "sql",       "nth_value",    "pattern sql.nth_value(b:any_1, n:any_2, s:lng, 
e:lng):any_1 ", "SQLnth_value;",        "return the nth value of each group"    
]
+[ "sql",       "nth_value",    "pattern sql.nth_value(b:any_1, n:bat[:any_2], 
s:lng, e:lng):any_1 ",   "SQLnth_value;",        "return the nth value of each 
group"    ]
 [ "sql",       "ntile",        "pattern sql.ntile(b:any_1, n:any_2, p:any_3, 
o:any_4):any_2 ", "SQLntile;",    "return the groups divided as equally as 
possible"      ]
 [ "sql",       "ntile",        "pattern sql.ntile(b:any_1, n:bat[:any_2], 
p:any_3, o:any_4):any_2 ",   "SQLntile;",    "return the groups divided as 
equally as possible"      ]
 [ "sql",       "optimizer_updates",    "pattern sql.optimizer_updates():void 
",        "SQLoptimizersUpdate;", ""      ]
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -215,13 +215,13 @@ int GDK_vm_trim;
 gdk_return GDKanalyticalavg(BAT *r, BAT *b, BAT *s, BAT *e, int tpe);
 gdk_return GDKanalyticalcount(BAT *r, BAT *b, BAT *s, BAT *e, const bit 
*restrict ignore_nils, int tpe);
 gdk_return GDKanalyticaldiff(BAT *r, BAT *b, BAT *p, int tpe);
-gdk_return GDKanalyticalfirst(BAT *r, BAT *b, BAT *p, int tpe);
+gdk_return GDKanalyticalfirst(BAT *r, BAT *b, BAT *s, BAT *e, int tpe);
 gdk_return GDKanalyticallag(BAT *r, BAT *b, BAT *p, BUN lag, const void 
*restrict default_value, int tpe);
-gdk_return GDKanalyticallast(BAT *r, BAT *b, BAT *p, int tpe);
+gdk_return GDKanalyticallast(BAT *r, BAT *b, BAT *s, BAT *e, int tpe);
 gdk_return GDKanalyticallead(BAT *r, BAT *b, BAT *p, BUN lead, const void 
*restrict default_value, int tpe);
 gdk_return GDKanalyticalmax(BAT *r, BAT *b, BAT *s, BAT *e, int tpe);
 gdk_return GDKanalyticalmin(BAT *r, BAT *b, BAT *s, BAT *e, int tpe);
-gdk_return GDKanalyticalnthvalue(BAT *r, BAT *b, BAT *p, BUN nth, int tpe);
+gdk_return GDKanalyticalnthvalue(BAT *r, BAT *b, BAT *s, BAT *e, BAT *l, const 
void *restrict bound, int tp1, int tp2);
 gdk_return GDKanalyticalntile(BAT *r, BAT *b, BAT *p, int tpe, const void 
*restrict ntile);
 gdk_return GDKanalyticalprod(BAT *r, BAT *b, BAT *s, BAT *e, int tp1, int tp2);
 gdk_return GDKanalyticalsum(BAT *r, BAT *b, BAT *s, BAT *e, int tp1, int tp2);
diff --git a/gdk/gdk_analytic_func.c b/gdk/gdk_analytic_func.c
--- a/gdk/gdk_analytic_func.c
+++ b/gdk/gdk_analytic_func.c
@@ -420,7 +420,7 @@ allocation_error:
                        if (is_##TPE2##_nil(lnth) || end[i] <= start[i] || 
(lng)(lnth - 1) > (end[i] - start[i])) \
                                curval = (void *) nil; \
                        else \
-                               curval = BUNtail(bpi, (BUN) start[i] + lnth - 
1); \
+                               curval = BUNtail(bpi, (BUN) (start[i] + lnth - 
1)); \
                        if (BUNappend(r, curval, false) != GDK_SUCCEED) \
                                goto allocation_error; \
                        if (atomcmp(curval, nil) == 0) \
@@ -500,7 +500,7 @@ GDKanalyticalnthvalue(BAT *r, BAT *b, BA
                                        nth--;
                                        for (; i < cnt; i++) {
                                                curval = (end[i] > start[i] && 
nth < (end[i] - start[i])) ?
-                                                                BUNtail(bpi, 
(BUN) start[i] + nth) : (void *) nil;
+                                                                BUNtail(bpi, 
(BUN) (start[i] + nth)) : (void *) nil;
                                                if (BUNappend(r, curval, false) 
!= GDK_SUCCEED)
                                                        goto allocation_error;
                                                if (atomcmp(curval, nil) == 0)
diff --git a/sql/test/Tests/systemfunctions.stable.out 
b/sql/test/Tests/systemfunctions.stable.out
--- a/sql/test/Tests/systemfunctions.stable.out
+++ b/sql/test/Tests/systemfunctions.stable.out
@@ -569,8 +569,6 @@ Ready.
 [ "sys",       "exp",  1,      "double",       ""      ]
 [ "sys",       "first_value",  0,      "any",  "first_value"   ]
 [ "sys",       "first_value",  1,      "any",  ""      ]
-[ "sys",       "first_value",  2,      "boolean",      ""      ]
-[ "sys",       "first_value",  3,      "boolean",      ""      ]
 [ "sys",       "fitsattach",   0,      "clob", "create procedure 
fitsattach(fname string) external name fits.attach;"  ]
 [ "sys",       "fitsload",     0,      "clob", "create procedure 
fitsload(tname string) external name fits.load;"      ]
 [ "sys",       "floor",        0,      "real", "floor" ]
@@ -819,8 +817,6 @@ Ready.
 [ "sys",       "lag",  5,      "boolean",      ""      ]
 [ "sys",       "last_value",   0,      "any",  "last_value"    ]
 [ "sys",       "last_value",   1,      "any",  ""      ]
-[ "sys",       "last_value",   2,      "boolean",      ""      ]
-[ "sys",       "last_value",   3,      "boolean",      ""      ]
 [ "sys",       "lcase",        0,      "char", "toLower"       ]
 [ "sys",       "lcase",        1,      "char", ""      ]
 [ "sys",       "lcase",        0,      "varchar",      "toLower"       ]
diff --git a/sql/test/Tests/systemfunctions.stable.out.int128 
b/sql/test/Tests/systemfunctions.stable.out.int128
--- a/sql/test/Tests/systemfunctions.stable.out.int128
+++ b/sql/test/Tests/systemfunctions.stable.out.int128
@@ -605,8 +605,6 @@ Ready.
 [ "sys",       "exp",  1,      "double",       ""      ]
 [ "sys",       "first_value",  0,      "any",  "first_value"   ]
 [ "sys",       "first_value",  1,      "any",  ""      ]
-[ "sys",       "first_value",  2,      "boolean",      ""      ]
-[ "sys",       "first_value",  3,      "boolean",      ""      ]
 [ "sys",       "fitsattach",   0,      "clob", "create procedure 
fitsattach(fname string) external name fits.attach;"  ]
 [ "sys",       "fitsload",     0,      "clob", "create procedure 
fitsload(tname string) external name fits.load;"      ]
 [ "sys",       "floor",        0,      "real", "floor" ]
@@ -876,8 +874,6 @@ Ready.
 [ "sys",       "lag",  5,      "boolean",      ""      ]
 [ "sys",       "last_value",   0,      "any",  "last_value"    ]
 [ "sys",       "last_value",   1,      "any",  ""      ]
-[ "sys",       "last_value",   2,      "boolean",      ""      ]
-[ "sys",       "last_value",   3,      "boolean",      ""      ]
 [ "sys",       "lcase",        0,      "char", "toLower"       ]
 [ "sys",       "lcase",        1,      "char", ""      ]
 [ "sys",       "lcase",        0,      "varchar",      "toLower"       ]
@@ -1387,28 +1383,18 @@ Ready.
 [ "sys",       "nth_value",    0,      "any",  "nth_value"     ]
 [ "sys",       "nth_value",    1,      "any",  ""      ]
 [ "sys",       "nth_value",    2,      "tinyint",      ""      ]
-[ "sys",       "nth_value",    3,      "boolean",      ""      ]
-[ "sys",       "nth_value",    4,      "boolean",      ""      ]
 [ "sys",       "nth_value",    0,      "any",  "nth_value"     ]
 [ "sys",       "nth_value",    1,      "any",  ""      ]
 [ "sys",       "nth_value",    2,      "smallint",     ""      ]
-[ "sys",       "nth_value",    3,      "boolean",      ""      ]
-[ "sys",       "nth_value",    4,      "boolean",      ""      ]
 [ "sys",       "nth_value",    0,      "any",  "nth_value"     ]
 [ "sys",       "nth_value",    1,      "any",  ""      ]
 [ "sys",       "nth_value",    2,      "int",  ""      ]
-[ "sys",       "nth_value",    3,      "boolean",      ""      ]
-[ "sys",       "nth_value",    4,      "boolean",      ""      ]
 [ "sys",       "nth_value",    0,      "any",  "nth_value"     ]
 [ "sys",       "nth_value",    1,      "any",  ""      ]
 [ "sys",       "nth_value",    2,      "bigint",       ""      ]
-[ "sys",       "nth_value",    3,      "boolean",      ""      ]
-[ "sys",       "nth_value",    4,      "boolean",      ""      ]
 [ "sys",       "nth_value",    0,      "any",  "nth_value"     ]
 [ "sys",       "nth_value",    1,      "any",  ""      ]
 [ "sys",       "nth_value",    2,      "hugeint",      ""      ]
-[ "sys",       "nth_value",    3,      "boolean",      ""      ]
-[ "sys",       "nth_value",    4,      "boolean",      ""      ]
 [ "sys",       "ntile",        0,      "tinyint",      "ntile" ]
 [ "sys",       "ntile",        1,      "any",  ""      ]
 [ "sys",       "ntile",        2,      "tinyint",      ""      ]
diff --git a/sql/test/emptydb/Tests/check.stable.out 
b/sql/test/emptydb/Tests/check.stable.out
--- a/sql/test/emptydb/Tests/check.stable.out
+++ b/sql/test/emptydb/Tests/check.stable.out
@@ -2302,7 +2302,7 @@ drop function pcre_replace(string, strin
 [ "sys",       "exist",        "SYSTEM",       "exist",        "aggr", 
"Internal C",   "Aggregate function",   false,  false,  false,  "res",  
"boolean",      1,      0,      "out",  "arg",  "any",  0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "exp",  "SYSTEM",       "exp",  "mmath",        "Internal C",   
"Scalar function",      false,  false,  false,  "res_0",        "double",       
53,     0,      "out",  "arg_1",        "double",       53,     0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "exp",  "SYSTEM",       "exp",  "mmath",        "Internal C",   
"Scalar function",      false,  false,  false,  "res_0",        "real", 24,     
0,      "out",  "arg_1",        "real", 24,     0,      "in",   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "first_value",  "SYSTEM",       "first_value",  "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "boolean",      1,      0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
+[ "sys",       "first_value",  "SYSTEM",       "first_value",  "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "fitsattach",   "SYSTEM",       "create procedure 
fitsattach(fname string) external name fits.attach;", "fits", "MAL",  
"Procedure",    true,   false,  false,  "fname",        "clob", 0,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "fitsload",     "SYSTEM",       "create procedure 
fitsload(tname string) external name fits.load;",     "fits", "MAL",  
"Procedure",    true,   false,  false,  "tname",        "clob", 0,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "floor",        "SYSTEM",       "floor",        "mmath",        
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"double",       53,     0,      "out",  "arg_1",        "double",       53,     
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
@@ -2387,7 +2387,7 @@ drop function pcre_replace(string, strin
 [ "sys",       "lag",  "SYSTEM",       "lag",  "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "any",  0,      
0,      "out",  "arg_1",        "any",  0,      0,      "in",   "arg_2",        
"smallint",     16,     0,      "in",   "arg_3",        "boolean",      1,      
0,      "in",   "arg_4",        "boolean",      1,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "lag",  "SYSTEM",       "lag",  "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "any",  0,      
0,      "out",  "arg_1",        "any",  0,      0,      "in",   "arg_2",        
"tinyint",      8,      0,      "in",   "arg_3",        "any",  0,      0,      
"in",   "arg_4",        "boolean",      1,      0,      "in",   "arg_5",        
"boolean",      1,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "lag",  "SYSTEM",       "lag",  "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "any",  0,      
0,      "out",  "arg_1",        "any",  0,      0,      "in",   "arg_2",        
"tinyint",      8,      0,      "in",   "arg_3",        "boolean",      1,      
0,      "in",   "arg_4",        "boolean",      1,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "last_value",   "SYSTEM",       "last_value",   "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "boolean",      1,      0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
+[ "sys",       "last_value",   "SYSTEM",       "last_value",   "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "lcase",        "SYSTEM",       "toLower",      "str",  
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"char", 0,      0,      "out",  "arg_1",        "char", 0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "lcase",        "SYSTEM",       "toLower",      "str",  
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"clob", 0,      0,      "out",  "arg_1",        "clob", 0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "lcase",        "SYSTEM",       "toLower",      "str",  
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"varchar",      0,      0,      "out",  "arg_1",        "varchar",      0,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
@@ -2559,11 +2559,11 @@ drop function pcre_replace(string, strin
 [ "sys",       "not_unique",   "SYSTEM",       "not_unique",   "sql",  
"Internal C",   "Aggregate function",   false,  false,  false,  "res",  
"boolean",      1,      0,      "out",  "arg",  "oid",  63,     0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "not_uniques",  "SYSTEM",       "not_uniques",  "sql",  
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"oid",  63,     0,      "out",  "arg_1",        "bigint",       64,     0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "not_uniques",  "SYSTEM",       "not_uniques",  "sql",  
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"oid",  63,     0,      "out",  "arg_1",        "oid",  63,     0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
-[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "bigint",       64,     0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   "arg_4",        "boolean",      1,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "hugeint",      128,    0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   "arg_4",        "boolean",      1,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "int",  32,     0,      "in",   "arg_3",        "boolean",      
1,      0,      "in",   "arg_4",        "boolean",      1,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "smallint",     16,     0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   "arg_4",        "boolean",      1,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "tinyint",      8,      0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   "arg_4",        "boolean",      1,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
+[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "bigint",       64,     0,      "in",   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
+[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "hugeint",      128,    0,      "in",   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
+[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "int",  32,     0,      "in",   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
+[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "smallint",     16,     0,      "in",   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
+[ "sys",       "nth_value",    "SYSTEM",       "nth_value",    "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "tinyint",      8,      0,      "in",   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
 [ "sys",       "ntile",        "SYSTEM",       "ntile",        "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"bigint",       64,     0,      "out",  "arg_1",        "any",  0,      0,      
"in",   "arg_2",        "bigint",       64,     0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   "arg_4",        "boolean",      1,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "ntile",        "SYSTEM",       "ntile",        "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"hugeint",      128,    0,      "out",  "arg_1",        "any",  0,      0,      
"in",   "arg_2",        "hugeint",      128,    0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   "arg_4",        "boolean",      1,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "ntile",        "SYSTEM",       "ntile",        "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "int",  32,     0,      "in",   "arg_3",        "boolean",      
1,      0,      "in",   "arg_4",        "boolean",      1,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
diff --git a/sql/test/emptydb/Tests/check.stable.out.32bit 
b/sql/test/emptydb/Tests/check.stable.out.32bit
--- a/sql/test/emptydb/Tests/check.stable.out.32bit
+++ b/sql/test/emptydb/Tests/check.stable.out.32bit
@@ -2302,7 +2302,7 @@ drop function pcre_replace(string, strin
 [ "sys",       "exist",        "SYSTEM",       "exist",        "aggr", 
"Internal C",   "Aggregate function",   false,  false,  false,  "res",  
"boolean",      1,      0,      "out",  "arg",  "any",  0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "exp",  "SYSTEM",       "exp",  "mmath",        "Internal C",   
"Scalar function",      false,  false,  false,  "res_0",        "double",       
53,     0,      "out",  "arg_1",        "double",       53,     0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "exp",  "SYSTEM",       "exp",  "mmath",        "Internal C",   
"Scalar function",      false,  false,  false,  "res_0",        "real", 24,     
0,      "out",  "arg_1",        "real", 24,     0,      "in",   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "first_value",  "SYSTEM",       "first_value",  "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "boolean",      1,      0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
+[ "sys",       "first_value",  "SYSTEM",       "first_value",  "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "fitsattach",   "SYSTEM",       "create procedure 
fitsattach(fname string) external name fits.attach;", "fits", "MAL",  
"Procedure",    true,   false,  false,  "fname",        "clob", 0,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "fitsload",     "SYSTEM",       "create procedure 
fitsload(tname string) external name fits.load;",     "fits", "MAL",  
"Procedure",    true,   false,  false,  "tname",        "clob", 0,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "floor",        "SYSTEM",       "floor",        "mmath",        
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"double",       53,     0,      "out",  "arg_1",        "double",       53,     
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
@@ -2387,7 +2387,7 @@ drop function pcre_replace(string, strin
 [ "sys",       "lag",  "SYSTEM",       "lag",  "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "any",  0,      
0,      "out",  "arg_1",        "any",  0,      0,      "in",   "arg_2",        
"smallint",     16,     0,      "in",   "arg_3",        "boolean",      1,      
0,      "in",   "arg_4",        "boolean",      1,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "lag",  "SYSTEM",       "lag",  "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "any",  0,      
0,      "out",  "arg_1",        "any",  0,      0,      "in",   "arg_2",        
"tinyint",      8,      0,      "in",   "arg_3",        "any",  0,      0,      
"in",   "arg_4",        "boolean",      1,      0,      "in",   "arg_5",        
"boolean",      1,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "lag",  "SYSTEM",       "lag",  "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "any",  0,      
0,      "out",  "arg_1",        "any",  0,      0,      "in",   "arg_2",        
"tinyint",      8,      0,      "in",   "arg_3",        "boolean",      1,      
0,      "in",   "arg_4",        "boolean",      1,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "last_value",   "SYSTEM",       "last_value",   "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "boolean",      1,      0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
+[ "sys",       "last_value",   "SYSTEM",       "last_value",   "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"any",  0,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "lcase",        "SYSTEM",       "toLower",      "str",  
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"char", 0,      0,      "out",  "arg_1",        "char", 0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "lcase",        "SYSTEM",       "toLower",      "str",  
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"clob", 0,      0,      "out",  "arg_1",        "clob", 0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "lcase",        "SYSTEM",       "toLower",      "str",  
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"varchar",      0,      0,      "out",  "arg_1",        "varchar",      0,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
diff --git a/sql/test/emptydb/Tests/check.stable.out.int128 
b/sql/test/emptydb/Tests/check.stable.out.int128
--- a/sql/test/emptydb/Tests/check.stable.out.int128
+++ b/sql/test/emptydb/Tests/check.stable.out.int128
@@ -2325,7 +2325,7 @@ drop function pcre_replace(string, strin
 [ "sys",       "exist",        "SYSTEM",       "exist",        "aggr", 
"Internal C",   "Aggregate function",   false,  false,  false,  "res",  
"boolean",      1,      0,      "out",  "arg",  "any",  0,      0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "exp",  "SYSTEM",       "exp",  "mmath",        "Internal C",   
"Scalar function",      false,  false,  false,  "res_0",        "double",       
53,     0,      "out",  "arg_1",        "double",       53,     0,      "in",   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    
]
 [ "sys",       "exp",  "SYSTEM",       "exp",  "mmath",        "Internal C",   
"Scalar function",      false,  false,  false,  "res_0",        "real", 24,     
0,      "out",  "arg_1",        "real", 24,     0,      "in",   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to