edmondop commented on PR #11013:
URL: https://github.com/apache/datafusion/pull/11013#issuecomment-2185314780
@jayzhan211 I have started experimenting with an optimizer rule, but
removing the distinct result in such an error:
```
running 2 tests
test eliminate_distinct::tests::eliminate_distinct_from_min_expr ... FAILED
test eliminate_nested_union::tests::eliminate_distinct_nothing ... ok
failures:
---- eliminate_distinct::tests::eliminate_distinct_from_min_expr stdout ----
Transformed yes true
Error: Context("Optimizer rule 'eliminate_distinct' failed",
Context("eliminate_distinct", Internal("Failed due to a difference in schemas,
original schema: DFSchema { inner: Schema { fields: [Field { name: \"a\",
data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false,
metadata: {} }, Field { name: \"MIN(DISTINCT test.b)\", data_type: Int64,
nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }], metadata:
{} }, field_qualifiers: [Some(Bare { table: \"test\" }), None],
functional_dependencies: FunctionalDependencies { deps: [FunctionalDependence {
source_indices: [0], target_indices: [0, 1], nullable: false, mode: Single }] }
}, new schema: DFSchema { inner: Schema { fields: [Field { name: \"a\",
data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false,
metadata: {} }, Field { name: \"MIN(test.b)\", data_type: Int64, nullable:
true, dict_id: 0, dict_is_ordered: false, metadata: {} }], metadata: {} },
field_qualifiers: [Some(Bare { table:
\"test\" }), None], functional_dependencies: FunctionalDependencies { deps:
[FunctionalDependence { source_indices: [0], target_indices: [0, 1], nullable:
false, mode: Single }] } }")))
```
Do I need to change also the equivalence rules?
--
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]