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

Function test_like_nullability

datafusion/expr/src/expr_schema.rs:1011–1024  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1009
1010 #[test]
1011 fn test_like_nullability() {
1012 let get_schema = |nullable| {
1013 MockExprSchema::new()
1014 .with_data_type(DataType::Utf8)
1015 .with_nullable(nullable)
1016 };
1017
1018 let expr = col("foo").like(lit("bar"));
1019 assert!(!expr.nullable(&get_schema(false)).unwrap());
1020 assert!(expr.nullable(&get_schema(true)).unwrap());
1021
1022 let expr = col("foo").like(lit(ScalarValue::Utf8(None)));
1023 assert!(expr.nullable(&get_schema(false)).unwrap());
1024 }
1025
1026 #[test]
1027 fn expr_schema_data_type() {

Callers

nothing calls this directly

Calls 6

newFunction · 0.85
with_data_typeMethod · 0.80
likeMethod · 0.80
colFunction · 0.70
litFunction · 0.70
with_nullableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…