jackwener commented on code in PR #4702:
URL: https://github.com/apache/arrow-datafusion/pull/4702#discussion_r1055114774
##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -502,26 +502,27 @@ mod tests {
}
#[test]
- fn generate_same_schema_different_metadata() {
+ fn generate_same_schema_different_metadata() -> Result<()> {
// if the plan creates more metadata than previously (because
// some wrapping functions are removed, etc) do not error
let opt = Optimizer::with_rules(vec![Arc::new(GetTableScanRule {})]);
let config = OptimizerContext::new().with_skip_failing_rules(false);
- let input = Arc::new(test_table_scan().unwrap());
+ let input = Arc::new(test_table_scan()?);
let input_schema = input.schema().clone();
- let plan = LogicalPlan::Projection(Projection {
- expr: vec![col("a"), col("b"), col("c")],
+ let plan = LogicalPlan::Projection(Projection::try_new_with_schema(
+ vec![col("a"), col("b"), col("c")],
input,
- schema: add_metadata_to_fields(input_schema.as_ref()),
- });
Review Comment:
original we can construct `Project` bypass the `try_new()`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]