Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Oct 8, 2025

Which issue does this PR close?

Rationale for this change

While chasing down a bug related to planning, the root cause, as @pepijnve points out in #17813 (comment) is that a call to simplify changed the schema (in this case it changed the nullability).

Let's make it clear in the documentation of simplify must not change the expressions schema otherwise errors downstream may result

What changes are included in this PR?

Add additional note to docs

Are these changes tested?

CI

Are there any user-facing changes?

More docs. No functional changes

@alamb alamb added the documentation Improvements or additions to documentation label Oct 8, 2025
@alamb alamb marked this pull request as ready for review October 8, 2025 19:53
@github-actions github-actions bot added logical-expr Logical plan and expressions and removed documentation Improvements or additions to documentation labels Oct 8, 2025
Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to be more defensive about this, such as a (debug) assert that checks this property at the callsite of simplify in the planner? 🤔

Also do we need to add similar note for udaf/udwf or its only for scalar functions?

@alamb
Copy link
Contributor Author

alamb commented Oct 9, 2025

Also do we need to add similar note for udaf/udwf or its only for scalar functions?

Good call, added

@alamb
Copy link
Contributor Author

alamb commented Oct 9, 2025

Is it possible to be more defensive about this, such as a (debug) assert that checks this property at the callsite of simplify in the planner? 🤔

Filed a ticket:

Will give it a try and see how it goes

@alamb alamb added this pull request to the merge queue Oct 10, 2025
@alamb
Copy link
Contributor Author

alamb commented Oct 10, 2025

Thanks again @Jefffrey

Merged via the queue into apache:main with commit 37ad8a5 Oct 10, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logical-expr Logical plan and expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants