Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support accessing members of a conditional value #35390

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ranma42
Copy link
Contributor

@ranma42 ranma42 commented Dec 28, 2024

This changeset adds support for accessing a member of the result of a conditional expression.

It achieves this by folding the member access into the conditional.

Fixes #34589.

@ranma42
Copy link
Contributor Author

ranma42 commented Dec 28, 2024

Note that the updated baselines point to a missing CASE simplification (CASE WHEN nonNullableX THEN TRUE ELSE FALSE END -> nonNullableX).
Additionally, the test I implemented currently hits #28077 (neither join is really needed).

I would like to add a couple of missing test cases before marking as ready:

I am also thinking that it might be a good idea to write the tests so that they do not interact with #28077, so I will probably end up rewriting the existing test. What is the best place for these tests? (if I want to check the behavior on different subclasses, maybe InheritanceQueryTestBase makes more sense 🤔 )

@ranma42 ranma42 changed the title Support accessing a members of a conditional value Support accessing members of a conditional value Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support projecting different navigations (but same type) via conditional operator
1 participant