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

Update the template expression proto to improve transmission efficiency #341

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

xiaocai2333
Copy link
Contributor

LongArray long_data = 2;
DoubleArray double_data = 3;
StringArray string_data = 4;
TemplateArrayValue array_data = 5;
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need TemplateArrayValue array_data = 5;?

if we have a proto TemplateArrayValue{array_data: TemplateArrayValue{bool_data: [true, false, false]}}, why not directly use TemplateArrayValue{bool_data: [true, false, false]}?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

array_data is used for multidimensional arrays, and the prototype for using it can be:
json["A"] == [[1,2,3], [4,5,6]].
It will be converted into: TemplateValue{array_val: TemplateArrayValue{array_data: [TemplateArrayValue{long_data: [1,2,3]}, TemplateArrayValue{long_data:[3,4,5]}]}}

Copy link
Contributor

Choose a reason for hiding this comment

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

but TemplateArrayValue array_data is not repeated, how can you put 2 TemplateArrayValue{long_data in a single TemplateArrayValue{array_data?

your example formatted:

TemplateValue{array_val: 
    TemplateArrayValue{array_data: [
        TemplateArrayValue{long_data: [1,2,3]}, 
        TemplateArrayValue{long_data:[3,4,5]}
    ]}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

o~, need repeated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

update it, please review again.

@xiaocai2333 xiaocai2333 force-pushed the update_expression_proto branch from 3e358a2 to 4d6ad9c Compare November 6, 2024 06:38
@zhengbuqian
Copy link
Contributor

/lgtm

@yhmo
Copy link
Collaborator

yhmo commented Nov 6, 2024

/approve

@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xiaocai2333, yhmo

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

The pull request process is described 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

@sre-ci-robot sre-ci-robot merged commit 5de5d0c into milvus-io:master Nov 6, 2024
4 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.

4 participants