Skip to content

Handle null partition keys in a bound statement #40

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

Merged
merged 4 commits into from
Mar 7, 2025

Conversation

ashetkar
Copy link

@ashetkar ashetkar commented Feb 26, 2024

The PartitionAwarePolicy does not expect null values for the partition key in bound statements.
But null values could be set for partition keys by mistake and that should not cause NPEs coming from the driver.
Nulls are handled simply by falling back to the YugabyteDefaultLoadBalancingPolicy.

Testing
Test case added here: ashetkar/yugabyte-db#1

@ashetkar ashetkar marked this pull request as ready for review January 27, 2025 11:09
Copy link

@Sfurti-yb Sfurti-yb left a comment

Choose a reason for hiding this comment

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

LGTM, please add the details of the testing done here too

@ashetkar
Copy link
Author

ashetkar commented Mar 7, 2025

Test case added here: ashetkar/yugabyte-db#1. Can be merged only after the driver is released.

@ashetkar ashetkar merged commit 22df7f7 into 4.15.x Mar 7, 2025
@ashetkar ashetkar deleted the null-partition-keys branch March 7, 2025 11:11
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.

2 participants