jonahgao commented on code in PR #12166:
URL: https://github.com/apache/datafusion/pull/12166#discussion_r1730816696
##########
datafusion/sql/src/unparser/rewrite.rs:
##########
@@ -59,10 +59,8 @@ pub(super) fn normalize_union_schema(plan: &LogicalPlan) ->
Result<LogicalPlan>
let transformed_plan = plan.transform_up(|plan| match plan {
LogicalPlan::Union(mut union) => {
- let schema = match Arc::try_unwrap(union.schema) {
- Ok(inner) => inner,
- Err(schema) => (*schema).clone(),
- };
+ let schema =
+ Arc::try_unwrap(union.schema).unwrap_or_else(|schema|
(*schema).clone());
Review Comment:
same as above
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]