calcite icon indicating copy to clipboard operation
calcite copied to clipboard

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

Open bchong95 opened this issue 4 years ago • 3 comments

This PR is just bringing back up:

#721

And here is the description:

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)

bchong95 avatar Jul 26 '21 22:07 bchong95

Can someone approve running workflows for me?

bchong95 avatar Aug 19 '21 22:08 bchong95

you should fix conflicting files and squash commits.

xy2953396112 avatar Sep 08 '21 12:09 xy2953396112

@xy2953396112 please let me know if you would like to see anything else for a merge approval :)

bchong95 avatar Oct 11 '21 21:10 bchong95