Re: TimestampAdd/Diff rewrite rules

2019-11-09 Thread Stamatis Zampetakis
Hi Dustin, The other alternative would be to pass your own SqlRexConvertletTable when you create the SqlToRelConverter [2]. Best, Stamatis [2]

Re: TimestampAdd/Diff rewrite rules

2019-11-09 Thread Dustin Freeman
Thanks Danny, Dustin On Sat, Nov 9, 2019 at 6:54 PM Danny Chan wrote: > Dear Dustin ~ > > The > TIMESTAMPADD(unit, count, timestamp) => timestamp + count * INTERVAL ‘1’ > UNIT [1] > conversion happens atomically during the sql-to-rel phrase, and there is > no way to “stop” the rewrite by

Re: [DISCUSS] Support Sql Hint for Calcite

2019-11-09 Thread Danny Chan
Hi, fellows, I’m planning to merge the hints PR in the following week, I’m very appreciated if you have other more review comment address. [1] Or if you have other thoughts, please address it here :) [1] https://github.com/apache/calcite/pull/1354 Best, Danny Chan 在 2019年10月30日 +0800

Re: TimestampAdd/Diff rewrite rules

2019-11-09 Thread Danny Chan
Dear Dustin ~ The TIMESTAMPADD(unit, count, timestamp) => timestamp + count * INTERVAL ‘1’ UNIT [1] conversion happens atomically during the sql-to-rel phrase, and there is no way to “stop” the rewrite by config. There is a hack way to implement this, you can overwrite the

TimestampAdd/Diff rewrite rules

2019-11-09 Thread Dustin Freeman
Hi, It seems that Calcite rewrites TimestampAdd(x, 100) to following expression [+($3, *(12:INTERVAL YEAR, 100))] Can anyone tell me how to stop above rewrite? Thanks, Dustin

[jira] [Created] (CALCITE-3489) Adding day interval to timestamp returns incorrect value

2019-11-09 Thread Jess Balint (Jira)
Jess Balint created CALCITE-3489: Summary: Adding day interval to timestamp returns incorrect value Key: CALCITE-3489 URL: https://issues.apache.org/jira/browse/CALCITE-3489 Project: Calcite