34db5f5652
## What changes were proposed in this pull request? In the PR, I propose to make creation of typed Literals `TIMESTAMP` and `DATE` consistent to the `Cast` expression. More precisely, reusing the `Cast` expression in the type constructors. In this way, it allows: - To use the same calendar in parsing methods - To support the same set of timestamp/date patterns For example, creating timestamp literal: ```sql SELECT TIMESTAMP '2019-01-14 20:54:00.000' ``` behaves similarly as casting the string literal: ```sql SELECT CAST('2019-01-14 20:54:00.000' AS TIMESTAMP) ``` ## How was this patch tested? This was tested by `SQLQueryTestSuite` as well as `ExpressionParserSuite`. Closes #23541 from MaxGekk/timestamp-date-constructors. Lead-authored-by: Maxim Gekk <maxim.gekk@databricks.com> Co-authored-by: Maxim Gekk <max.gekk@gmail.com> Signed-off-by: Herman van Hovell <hvanhovell@databricks.com> |
||
---|---|---|
.. | ||
benchmarks | ||
src | ||
pom.xml |