ParseToDate Expression
ParseToDate
is a RuntimeReplaceable expression that represents the to_date function (in logical query plans).
1 2 3 4 5 6 |
// DEMO to_date(e: Column): Column // DEMO to_date(e: Column, fmt: String): Column |
As a RuntimeReplaceable
expression, ParseToDate
is replaced by Catalyst Optimizer with the child expression:
-
Cast(left, DateType)
forto_date(e: Column): Column
function -
Cast(Cast(UnixTimestamp(left, format), TimestampType), DateType)
forto_date(e: Column, fmt: String): Column
function
1 2 3 4 5 6 |
// FIXME DEMO Conversion to `Cast(left, DateType)` // FIXME DEMO Conversion to `Cast(Cast(UnixTimestamp(left, format), TimestampType), DateType)` |
Creating ParseToDate Instance
ParseToDate
takes the following when created:
-
Left expression
-
format
expression -
Child expression