Skip to content

Commit

Permalink
grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGe00 committed Apr 9, 2024
1 parent 4356109 commit 2a2d1ea
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@
* Consider the following Hive input query:
* "SELECT CAST(from_utc_timestamp(a_date, 'America/Los_Angeles') AS DECIMAL(10, 0)) AS d FROM test.table_from_utc_timestamp"
*
* We add an `with_timezone` operator in this transformation, and with the added layer of Calcite validation which will
* implicitly cast the input to `with_timezone` which is a date type to the expected timestamp type.
* So instead of just:
* We add a `with_timezone` operator in this transformation, and with the added layer of Calcite validation, instead
* of just getting:
* "(with_timezone(table_from_utc_timestamp0.a_date), 'UTC')"
*
* We get an extra cast from calcite:
* We get an extra implicit cast from Calcite on the input to `with_timezone` which is a date type to the expected timestamp type:
* "(with_timezone(CAST(table_from_utc_timestamp0.a_date AS TIMESTAMP), 'UTC'))"
*/
public class CastOperatorTransformer extends SqlCallTransformer {
Expand Down

0 comments on commit 2a2d1ea

Please sign in to comment.