Skip to content

Commit 2ed58c3

Browse files
committed
remove the default match arm in create_function_physical_name
1 parent 8eff3de commit 2ed58c3

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

datafusion/src/logical_plan/expr.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,13 +1988,12 @@ fn create_name(e: &Expr, input_schema: &DFSchema) -> Result<String> {
19881988
}
19891989
}
19901990
Expr::Sort {
1991-
expr,
1991+
expr: _,
19921992
asc: _,
19931993
nulls_first: _,
1994-
} => Err(DataFusionError::Internal(format!(
1995-
"Create name does not support logical expression {:?}",
1996-
expr
1997-
))),
1994+
} => Err(DataFusionError::Internal(
1995+
"Create name does not support sort expression".to_string(),
1996+
)),
19981997
Expr::Wildcard => Err(DataFusionError::Internal(
19991998
"Create name does not support wildcard".to_string(),
20001999
)),

datafusion/src/physical_plan/planner.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,16 @@ fn create_physical_name(e: &Expr, is_first_expr: bool) -> Result<String> {
197197
Ok(format!("{} BETWEEN {} AND {}", expr, low, high))
198198
}
199199
}
200-
other => Err(DataFusionError::NotImplemented(format!(
201-
"Cannot derive physical field name for logical expression {:?}",
202-
other
203-
))),
200+
Expr::Sort {
201+
expr: _,
202+
asc: _,
203+
nulls_first: _,
204+
} => Err(DataFusionError::Internal(
205+
"Create physical name does not support sort expression".to_string(),
206+
)),
207+
Expr::Wildcard => Err(DataFusionError::Internal(
208+
"Create physical name does not support wildcard".to_string(),
209+
)),
204210
}
205211
}
206212

0 commit comments

Comments
 (0)