byteink opened a new issue, #6606:
URL: https://github.com/apache/arrow-datafusion/issues/6606
### Describe the bug
Internal error: Optimizer rule 'scalar_subquery_to_join' failed, due to
generate a different schema,
original schema: DFSchema { fields: [DFField { qualifier: None, field: Field
{ name: "t.a > **AVG(t.a)**", data_type: Boolean, nullable: true, dict_id: 0,
dict_is_ordered: false, metadata: {} } }], metadata: {} },
new schema : DFSchema { fields: [DFField { qualifier: None, field: Field {
name: "t.a > **__scalar_sq_1.__value**", data_type: Boolean, nullable: true,
dict_id: 0, dict_is_ordered: false, metadata: {} } }], metadata: {} }.
This was likely caused by a bug in DataFusion's code and we would welcome
that you file an bug report in our issue tracker
### To Reproduce
```shell
DataFusion CLI v26.0.0
❯ create table t(a int);
0 rows in set. Query took 0.005 seconds.
❯ select a > (select avg(a) from t) from t;
scalar_subquery_to_join
caused by
Internal error: Optimizer rule 'scalar_subquery_to_join' failed, due to
generate a different schema, original schema: DFSchema { fields: [DFField {
qualifier: None, field: Field { name: "t.a > AVG(t.a)", data_type: Boolean,
nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} } }],
metadata: {} }, new schema: DFSchema { fields: [DFField { qualifier: None,
field: Field { name: "t.a > __scalar_sq_1.__value", data_type: Boolean,
nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} } }],
metadata: {} }. This was likely caused by a bug in DataFusion's code and we
would welcome that you file an bug report in our issue tracker
```
### Expected behavior
_No response_
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]