Hi Martin,
If I am going to edit the scripts to run, I will for sure use the "day" function.
I am trying to avoid as much as possible to manually edit the user scripts and try to run it as is,
hence the question of possible introduction of a custom cast function that maps the interval to int so the syntax (cast interval as int) will find an appropriate function to call.
Since I am becoming more and more familiar with the MAL language, the calculator mal-module is responsible for providing the function for the casting between different types.
ex:
COMMAND batcalc.timestamp(X_0:bat[:str], X_1:bat[:oid], X_2:int, X_3:int):bat[:timestamp];
COMMENT "cast to timestamp and check for overflow";If I introduce a new mal-function that takes a :bat[:timestamp] and returns :bat[:int], how to instruct the engine or the sql layer that a new map exists and it can be called on cast(interval as int)?
Thank you.