calcite icon indicating copy to clipboard operation
calcite copied to clipboard

[CALCITE-2339] Add utility to convert datetime_plus to timestampadd

Open jduo opened this issue 7 years ago • 1 comments

Canonicalize the representation of adding a single time unit to a datetime type under the datetime_plus operator. Add a RexUtil method for converting back to timestampadd.

Add a hook that lets a SqlDialect request datetime_plus to be exposed as timestampadd.

This work duplicates some of the work in [CALCITE-2188], however it allows for this conversion to happen outside of SqlDialect. It also handles the case where an interval is not just a literal, but a multiplication of an interval literal by an integer (the TimestampAddConvertlet does this when converting TIMESTAMPADD to DATETIME_PLUS initially)

jduo avatar Jun 05 '18 10:06 jduo

Seems like master is failing in Travis CI? https://travis-ci.org/apache/calcite/jobs/489675325

jduo avatar Feb 07 '19 22:02 jduo