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

Function test_is_distinct_from

datafusion/sql/src/unparser/expr.rs:3708–3726  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3706
3707 #[test]
3708 fn test_is_distinct_from() {
3709 let expr = Expr::BinaryExpr(BinaryExpr::new(
3710 Box::new(col("c1")),
3711 Operator::IsDistinctFrom,
3712 Box::new(lit(true)),
3713 ));
3714
3715 let sql = expr_to_sql(&expr).unwrap().to_string();
3716 assert_eq!(sql, "(c1 IS DISTINCT FROM true)");
3717
3718 let expr = Expr::BinaryExpr(BinaryExpr::new(
3719 Box::new(col("c1")),
3720 Operator::IsNotDistinctFrom,
3721 Box::new(lit(true)),
3722 ));
3723
3724 let sql = expr_to_sql(&expr).unwrap().to_string();
3725 assert_eq!(sql, "(c1 IS NOT DISTINCT FROM true)");
3726 }
3727}

Callers

nothing calls this directly

Calls 6

newFunction · 0.85
expr_to_sqlFunction · 0.85
BinaryExprClass · 0.50
colFunction · 0.50
litFunction · 0.50
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…