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

Method array_has_to_sql_any

datafusion/sql/src/unparser/dialect.rs:409–424  ·  view source on GitHub ↗
(
        &self,
        unparser: &Unparser,
        args: &[Expr],
    )

Source from the content-addressed store, hash-verified

407
408impl PostgreSqlDialect {
409 fn array_has_to_sql_any(
410 &self,
411 unparser: &Unparser,
412 args: &[Expr],
413 ) -> Result<Option<ast::Expr>> {
414 let [haystack, needle] = args else {
415 return internal_err!("array_has expected 2 arguments, got {}", args.len());
416 };
417
418 Ok(Some(ast::Expr::AnyOp {
419 left: Box::new(unparser.expr_to_sql(needle)?),
420 compare_op: BinaryOperator::Eq,
421 right: Box::new(unparser.expr_to_sql(haystack)?),
422 is_some: false,
423 }))
424 }
425
426 fn round_to_sql_enforce_numeric(
427 &self,

Callers 1

Calls 2

newFunction · 0.85
expr_to_sqlMethod · 0.80

Tested by

no test coverage detected