calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sachin Rohaj <>
Subject Mapping arithmetic '+' operator with Date and Timestamp operands to target dialect functions
Date Fri, 23 Aug 2019 08:52:45 GMT

In one of my use case i am working on DATE and TIMESTAMP based operands. We
select date + interval '1' DAY from table;

I need to map this to target dialect.
select target_func(date, interval '1' DAY) from table;

*Approach*: I am planning to intercept the '+' operator in the
'SqlImplementor' class using 'call.type.getSqlTypeName()' and delegate that
responsibility to get the 'target_func' from the specific dialect.
For exampe: 'dialect.getTargetFunction(SqlTypeName)'.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message