MCPcopy Create free account
hub / github.com/apache/datafusion / character_length_to_sql

Function character_length_to_sql

datafusion/sql/src/unparser/utils.rs:522–536  ·  view source on GitHub ↗
(
    unparser: &Unparser,
    style: CharacterLengthStyle,
    character_length_args: &[Expr],
)

Source from the content-addressed store, hash-verified

520}
521
522pub(crate) fn character_length_to_sql(
523 unparser: &Unparser,
524 style: CharacterLengthStyle,
525 character_length_args: &[Expr],
526) -> Result<Option<ast::Expr>> {
527 let func_name = match style {
528 CharacterLengthStyle::CharacterLength => "character_length",
529 CharacterLengthStyle::Length => "length",
530 };
531
532 Ok(Some(unparser.scalar_function_to_sql(
533 func_name,
534 character_length_args,
535 )?))
536}
537
538/// SQLite does not support timestamp/date scalars like `to_timestamp`, `from_unixtime`, `date_trunc`, etc.
539/// This remaps `from_unixtime` to `datetime(expr, 'unixepoch')`, expecting the input to be in seconds.

Callers 1

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…