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

Function test_fmt_sql

datafusion/physical-expr/src/expressions/is_null.rs:214–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212
213 #[test]
214 fn test_fmt_sql() -> Result<()> {
215 let schema = Schema::new(vec![Field::new("a", DataType::Utf8, true)]);
216
217 // expression: "a is null"
218 let expr = is_null(col("a", &schema)?).unwrap();
219 let display_string = expr.to_string();
220 assert_eq!(display_string, "a@0 IS NULL");
221 let sql_string = fmt_sql(expr.as_ref()).to_string();
222 assert_eq!(sql_string, "a IS NULL");
223
224 Ok(())
225 }
226}

Callers

nothing calls this directly

Calls 6

newFunction · 0.85
fmt_sqlFunction · 0.85
is_nullFunction · 0.70
colFunction · 0.70
to_stringMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…