-
Notifications
You must be signed in to change notification settings - Fork 109
Ensure deterministic plan enumeration and channel conversion #662
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
base: main
Are you sure you want to change the base?
Conversation
…rdered sets for scope/slot tracking, add stable cost tiebreaker, and cover with determinism tests.
|
|
||
| private static String describeInputSlot(InputSlot<?> slot) { | ||
| if (slot == null) { | ||
| return "null"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this just return an actual null then? String is nullable, so this can be a valid value.
Or would this be a problem on comparison later on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning a "real" null would break the deterministic identifier: the values are .sorted() and then joined, and sorted() throws on nulls. The literal "null" keeps it stable and safe for comparison/concatenation. We could switch to real nulls only if we add null-safe sorting/joining.
|
|
||
| private static String describeChannel(Channel channel, boolean isSourceChannel) { | ||
| if (channel == null) { | ||
| return "null"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the comment about null on other describeX above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separates determinism fixes/tests from Spark DataFrames work. Cherry-picks commits 7bcf2ff and 93fbadb from PR #647.
solves #634