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

Function test_scalar_variable

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

Source from the content-addressed store, hash-verified

1194
1195 #[test]
1196 fn test_scalar_variable() {
1197 let mut meta = HashMap::new();
1198 meta.insert("bar".to_string(), "buzz".to_string());
1199 let meta = FieldMetadata::from(meta);
1200
1201 let field = Field::new("foo", DataType::Int32, true);
1202 let field = meta.add_to_field(field);
1203 let field = Arc::new(field);
1204
1205 let expr = Expr::ScalarVariable(field, vec!["foo".to_string()]);
1206
1207 let schema = MockExprSchema::new();
1208
1209 assert_eq!(meta, expr.metadata(&schema).unwrap());
1210 }
1211}

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
add_to_fieldMethod · 0.80
insertMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…