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

Fix when partition key is not supplied #605

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

ziyi-curiousthing
Copy link

Fix when partition key is not supplied, default to empty string.

Fix when partition key is not supplied, default to empty string.
@sre-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ziyi-curiousthing
To complete the pull request process, please assign cxie after the PR has been reviewed.
You can assign the PR to them by writing /assign @cxie in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@SimFG
Copy link
Collaborator

SimFG commented Jan 23, 2024

@ziyi-curiousthing it doesn't seem to change obviously. When partition_key is what value, an exception will occur

@ziyi-curiousthing
Copy link
Author

@SimFG This is to fix the case where user doesn't supply partition_key, so it is passed in as None and Milvus doesn't like it because the field type is string. I am not quite sure how to set the field to be optional so that it can take None (or save without this property). Any suggestions?

@SimFG
Copy link
Collaborator

SimFG commented Jan 23, 2024

@ziyi-curiousthing maybe when the partition key is None, you can set it's value to default, like:

partition_key = kwargs.get("partition_key", "default")

@SimFG
Copy link
Collaborator

SimFG commented Jan 23, 2024

And for the better way, you should have a param when initing the milvus, which is whether enable the partition key function.

Add parameter (use_partition_key) in initialising Milvus store
@ziyi-curiousthing
Copy link
Author

And for the better way, you should have a param when initing the milvus, which is whether enable the partition key function.

Thank you @SimFG for your feedback. Should be addressed now.

@SimFG SimFG merged commit 5f110cd into zilliztech:dev Jan 30, 2024
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants