jayzhan211 commented on code in PR #27143:
URL: https://github.com/apache/datafusion/pull/27143#discussion_r4499801837
##########
datafusion/physical-expr/src/expressions/case.rs:
##########
@@ -1307,6 +1325,24 @@ impl PhysicalExpr for CaseExpr {
}
}
+ fn return_field(&self, input_schema: &Schema) -> Result<FieldRef> {
Review Comment:
The `NOT` mismatch from #27155 can be a planning error here, not only extra
metadata: this query returns rows on `main` and now fails with "Cannot merge
field metadata with differing values". It's fine to handle this in #27155 since
the fix belongs in `NOT`; could you add this query there and adjust the note in
the PR description?
```sql
-- t(id INT, b BOOLEAN)
select case when id > 1
then not with_metadata(b, 'ARROW:extension:name', 'a.type')
else with_metadata(b, 'ARROW:extension:name', 'b.type') end
from t;
```
--
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]