You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following operations are defined in Substrait prototypes:
add(date, interval_year): -> timestamp
add(date, interval_day): -> timestamp
subtract(date, interval_year): -> date
subtract(date, interval_day): -> date
It looks like add and subtract behavior need to be consistent with regards to result type.
However, different databases/frameworks have different type inference for these operations:
Postrgres returns timestamp in all four cases
Calcite infers return type as date in all four cases
Probably it is not so important which type inference approach will be used by Substrait, because type casts from/to timestamp for operands/result can be used to adjust to specific DB semantics.
But there is no reason to let add and subtract have different type inference.
The text was updated successfully, but these errors were encountered:
Discussed in #574
Following operations are defined in Substrait prototypes:
It looks like
add
andsubtract
behavior need to be consistent with regards to result type.However, different databases/frameworks have different type inference for these operations:
date
in all four casesProbably it is not so important which type inference approach will be used by Substrait, because type casts from/to timestamp for operands/result can be used to adjust to specific DB semantics.
But there is no reason to let
add
andsubtract
have different type inference.The text was updated successfully, but these errors were encountered: