pub struct PrestoDialect;Expand description
Presto dialect
Implementations§
Source§impl PrestoDialect
impl PrestoDialect
Sourcepub fn oracle_to_presto_format(fmt: &str) -> String
pub fn oracle_to_presto_format(fmt: &str) -> String
Convert Oracle/PostgreSQL-style date format to Presto’s C-style format Oracle: dd, hh, hh24, mi, mm, ss, yyyy, yy Presto: %d, %H, %H, %i, %m, %s, %Y, %y
Sourcepub fn presto_to_java_format(fmt: &str) -> String
pub fn presto_to_java_format(fmt: &str) -> String
Convert Presto’s C-style date format to Java-style format (for Hive/Spark) Presto: %Y, %m, %d, %H, %i, %S, %s, %y, %T, %F Java: yyyy, MM, dd, HH, mm, ss, ss, yy, HH:mm:ss, yyyy-MM-dd
Sourcepub fn normalize_presto_format(fmt: &str) -> String
pub fn normalize_presto_format(fmt: &str) -> String
Normalize Presto format strings (e.g., %H:%i:%S -> %T, %Y-%m-%d -> %F)
Sourcepub fn presto_to_duckdb_format(fmt: &str) -> String
pub fn presto_to_duckdb_format(fmt: &str) -> String
Convert Presto’s C-style format to DuckDB C-style (only difference: %i -> %M for minutes)
Sourcepub fn presto_to_bigquery_format(fmt: &str) -> String
pub fn presto_to_bigquery_format(fmt: &str) -> String
Convert Presto’s C-style format to BigQuery format
Sourcepub fn is_default_timestamp_format(fmt: &str) -> bool
pub fn is_default_timestamp_format(fmt: &str) -> bool
Check if a Presto format string matches the default timestamp format
Sourcepub fn is_default_date_format(fmt: &str) -> bool
pub fn is_default_date_format(fmt: &str) -> bool
Check if a Presto format string matches the default date format
Trait Implementations§
Source§impl DialectImpl for PrestoDialect
impl DialectImpl for PrestoDialect
Source§fn dialect_type(&self) -> DialectType
fn dialect_type(&self) -> DialectType
Returns the
DialectType that identifies this dialect.Source§fn tokenizer_config(&self) -> TokenizerConfig
fn tokenizer_config(&self) -> TokenizerConfig
Returns the tokenizer configuration for this dialect. Read more
Source§fn generator_config(&self) -> GeneratorConfig
fn generator_config(&self) -> GeneratorConfig
Returns the generator configuration for this dialect. Read more
Source§fn transform_expr(&self, expr: Expression) -> Result<Expression>
fn transform_expr(&self, expr: Expression) -> Result<Expression>
Transforms a single expression node for this dialect, without recursing into children. Read more
Source§fn generator_config_for_expr(&self, _expr: &Expression) -> GeneratorConfig
fn generator_config_for_expr(&self, _expr: &Expression) -> GeneratorConfig
Returns a generator configuration tailored to a specific expression. Read more
Source§fn preprocess(&self, expr: Expression) -> Result<Expression>
fn preprocess(&self, expr: Expression) -> Result<Expression>
Applies whole-tree preprocessing transforms before the recursive per-node pass. Read more
Auto Trait Implementations§
impl Freeze for PrestoDialect
impl RefUnwindSafe for PrestoDialect
impl Send for PrestoDialect
impl Sync for PrestoDialect
impl Unpin for PrestoDialect
impl UnwindSafe for PrestoDialect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more