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

Heiarchical Partition Keys: Fixes bug for ReadMany where None Partition does not return results #4977

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

NaluTripician
Copy link
Contributor

Pull Request Template

Description

There is currently a bug in the ReadMany method where it does not return results for partial hierarchical partition keys when a partition key with a None Type is set.

new PartitionKeyBuilder().Add("part1").AddNoneType().Build()

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)

Closing issues

To automatically close an issue: closes #4946

@@ -304,6 +304,15 @@ private QueryDefinition CreateReadManyQueryDefinitionForOther(List<(string, Part
}
for (int j = 0; j < this.partitionKeySelectors.Count; j++)
{
if (pkValues[j] == Undefined.Value)
Copy link
Member

Choose a reason for hiding this comment

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

In-general ReadMany is for many point operation reads => each partition-key should be complete/full.

Hierarchical partitions: ReadMany as name might get mis-mapped for HierarchicalParittioning, isn't the ideal solution to use regular query instead?

if (pkValues[j] == Undefined.Value)
{
queryStringBuilder.Append(" AND ");
queryStringBuilder.Append("IS_DEFINED(c");
Copy link
Member

Choose a reason for hiding this comment

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

Clarification: Create will not work if any of the partition-keys are not defined right?
Can we please check this with query team.

Copy link
Member

Choose a reason for hiding this comment

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

Can this clause it-self be excluded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Enables automation to merge PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ReadMany] does not return results for partial hierarchical partiton keys
2 participants