[CALCITE-2339] Add utility to convert datetime_plus to timestampadd
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)
Can someone approve running workflows for me?
you should fix conflicting files and squash commits.
@xy2953396112 please let me know if you would like to see anything else for a merge approval :)