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

Function test_fmt_sql_4

datafusion/physical-expr/src/expressions/in_list.rs:1359–1370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1357
1358 #[test]
1359 fn test_fmt_sql_4() -> Result<()> {
1360 let schema = Schema::new(vec![Field::new("a", DataType::Utf8, true)]);
1361 let col_a = col("a", &schema)?;
1362 // Test: a NOT IN ('a', 'b', NULL)
1363 let list = vec![lit("a"), lit("b"), lit(ScalarValue::Utf8(None))];
1364 let expr = in_list(Arc::clone(&col_a), list, &true, &schema)?;
1365 let sql_string = fmt_sql(expr.as_ref()).to_string();
1366 let display_string = expr.to_string();
1367 assert_snapshot!(sql_string, @"a NOT IN (a, b, NULL)");
1368 assert_snapshot!(display_string, @"a@0 NOT IN (SET) ([a, b, NULL])");
1369 Ok(())
1370 }
1371
1372 #[test]
1373 fn in_list_struct() -> Result<()> {

Callers

nothing calls this directly

Calls 6

newFunction · 0.85
fmt_sqlFunction · 0.85
colFunction · 0.70
in_listFunction · 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…