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

Function create_expr_test

datafusion/core/tests/expr_api/mod.rs:414–422  ·  view source on GitHub ↗

Creates the physical expression from Expr and compares the Debug expression to the expected result.

(expr: Expr, expected_expr: &str)

Source from the content-addressed store, hash-verified

412/// Creates the physical expression from Expr and compares the Debug expression
413/// to the expected result.
414fn create_expr_test(expr: Expr, expected_expr: &str) {
415 let batch = &TEST_BATCH;
416 let df_schema = DFSchema::try_from(batch.schema()).unwrap();
417 let physical_expr = SessionContext::new()
418 .create_physical_expr(expr, &df_schema)
419 .unwrap();
420
421 assert_eq!(physical_expr.to_string(), expected_expr);
422}
423
424/// Creates the physical expression from Expr and runs the expr simplifier
425fn create_simplified_expr_test(expr: Expr, expected_expr: &str) {

Calls 3

newFunction · 0.85
schemaMethod · 0.45
create_physical_exprMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…