You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "HairstonE (via GitHub)" <gi...@apache.org> on 2026/05/23 16:56:12 UTC
[I] `= ANY` / `<> ALL` subquery fails to plan: `Schema contains duplicate unqualified field name mark` [datafusion]
HairstonE opened a new issue, #22477:
URL: https://github.com/apache/datafusion/issues/22477
### Describe the bug
Queries that use `ANY` / `ALL` subquery comparisons fail at planning time with an internal schema error instead of executing.
### To Reproduce
```
CREATE TABLE person(id INT, age INT);
INSERT INTO person VALUES (1, 20), (2, 30), (3, 40);
-- (1) ANY
SELECT id FROM person WHERE age = ANY (SELECT age FROM person);
-- (2) ALL
SELECT id FROM person WHERE age <> ALL (SELECT age FROM person);
```
Both queries fail at planning time with:
```
Optimizer rule 'optimize_projections' failed
caused by
Schema error: Schema contains duplicate unqualified field name mark
```
### Expected behavior
`ANY`: `age = ANY (SELECT age FROM person)` is true for every row (each row's age is in the set {20, 30, 40}). Expected output: ids 1, 2, 3.
`ALL`: `age <> ALL (SELECT age FROM person)` is false for every row. Expected output: zero rows.
### Additional context
_No response_
--
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: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] `= ANY` / `<> ALL` subquery fails to plan: `Schema contains duplicate unqualified field name mark` [datafusion]
Posted by "HairstonE (via GitHub)" <gi...@apache.org>.
HairstonE commented on issue #22477:
URL: https://github.com/apache/datafusion/issues/22477#issuecomment-4526003747
take
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] `= ANY` / `<> ALL` subquery fails to plan: `Schema contains duplicate unqualified field name mark` [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #22477: `= ANY` / `<> ALL` subquery fails to plan: `Schema contains duplicate unqualified field name mark`
URL: https://github.com/apache/datafusion/issues/22477
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org