Skip to main content

epoch_cast_to_ts

Function epoch_cast_to_ts 

Source
pub fn epoch_cast_to_ts(expr: Expression) -> Result<Expression>
Expand description

Convert epoch string in CAST to timestamp literal.

Replaces CAST('epoch' AS TIMESTAMP) with CAST('1970-01-01 00:00:00' AS TIMESTAMP) for dialects that don’t support the ‘epoch’ keyword.

Reference: transforms.py:595-604