Onyl recompute schema in TypeCoercion
when necessary
#10365
Labels
enhancement
New feature or request
TypeCoercion
when necessary
#10365
Is your feature request related to a problem or challenge?
Part of #10210 we are trying to make the optimizer faster by making the different optimizer passes faster.
#10356 avoids a bunch of copies in the TypeCoercion pass
@peter-toth pointed out https://github.com/apache/datafusion/pull/10356/files#r1588892502 that this pass still does more work than necessary as it still always recomputes the schema, even when it didn't make any changes
The root cause for this is that the expression rewrite that happens via
TypeCoercionRewriter
doesn't returnTransformed
and thus we must conservatively assume that the schema needs to be recomputedDescribe the solution you'd like
TypeCoercionRewriter
to return Transformed somehowLogicalPlan::recompute_schema
when the expression is actually transformedDescribe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: