jayzhan211 commented on code in PR #6796:
URL: https://github.com/apache/arrow-datafusion/pull/6796#discussion_r1283874181
##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -422,6 +424,11 @@ fn assert_schema_is_the_same(
prev_plan: &LogicalPlan,
new_plan: &LogicalPlan,
) -> Result<()> {
+ if rule_name == "unnest_expressions" {
Review Comment:
After removing alias, I still get the schema mismatch error
Internal error: Optimizer rule 'unnest_expressions' failed, due to generate
a different schema, original schema: DFSchema { fields: [DFField { qualifier:
None, field: Field { name: "unnest(make_array(Int64(1),Int64(2),Int64(3)))",
data_type: List(Field { name: "item", data_type: Int64, nullable: true,
dict_id: 0, dict_is_ordered: false, metadata: {} }), nullable: true, dict_id:
0, dict_is_ordered: false, metadata: {} } }, DFField { qualifier: None, field:
Field { name: "unnest(make_array(Int64(4),Int64(5)))", data_type: List(Field {
name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered:
false, metadata: {} }), nullable: true, dict_id: 0, dict_is_ordered: false,
metadata: {} } }], metadata: {}, functional_dependencies:
FunctionalDependencies { deps: [] } }, new schema: DFSchema { fields: [DFField
{ qualifier: None, field: Field { name:
"make_array(Int64(1),Int64(2),Int64(3))", data_type: Int64, nullable: true,
dict_id: 0, dict_is_ordered: false, metadata: {} }
}, DFField { qualifier: None, field: Field { name:
"make_array(Int64(4),Int64(5),NULL)", data_type: Int64, nullable: true,
dict_id: 0, dict_is_ordered: false, metadata: {} } }], metadata: {},
functional_dependencies: FunctionalDependencies { deps: [] } }
I don't know how to fix these schema changes
name changes: unnest(make_array(Int64(1),Int64(2),Int64(3))) ->
make_array(Int64(1),Int64(2),Int64(3))
data_type changes: List(int64) -> int64
--
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]