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

Support to range filter with json expr #23739

Merged
merged 1 commit into from
Apr 30, 2023
Merged

Conversation

yah01
Copy link
Member

@yah01 yah01 commented Apr 26, 2023

/kind feature
related #23389

@sre-ci-robot sre-ci-robot added the kind/feature Issues related to feature request from users label Apr 26, 2023
@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label Apr 26, 2023
@mergify mergify bot added the dco-passed DCO check passed. label Apr 26, 2023
@yah01 yah01 force-pushed the json-expr branch 2 times, most recently from 90fcc2a to eaabc0d Compare April 26, 2023 10:27
@mergify
Copy link
Contributor

mergify bot commented Apr 26, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 26, 2023

@yah01 ut workflow job failed, comment rerun ut can trigger the job again.

@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Merging #23739 (ffcb4b4) into master (016311a) will decrease coverage by 0.35%.
The diff coverage is 52.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23739      +/-   ##
==========================================
- Coverage   82.02%   81.67%   -0.35%     
==========================================
  Files         744      745       +1     
  Lines       97244    99639    +2395     
==========================================
+ Hits        79765    81385    +1620     
- Misses      14514    15289     +775     
  Partials     2965     2965              
Impacted Files Coverage Δ
...nternal/core/src/query/generated/ExecExprVisitor.h 100.00% <ø> (ø)
internal/core/src/segcore/ConcurrentVector.h 84.42% <ø> (+2.32%) ⬆️
internal/core/src/segcore/SegmentGrowing.h 100.00% <ø> (ø)
internal/core/src/query/PlanProto.cpp 77.43% <13.33%> (-5.90%) ⬇️
internal/core/src/common/Json.h 74.28% <36.36%> (+54.28%) ⬆️
...ternal/core/src/query/visitors/ExecExprVisitor.cpp 65.37% <51.83%> (-9.15%) ⬇️
internal/core/src/query/Parser.cpp 93.01% <71.42%> (+1.97%) ⬆️
internal/core/src/query/Expr.h 100.00% <100.00%> (ø)
internal/core/src/query/ExprImpl.h 100.00% <100.00%> (ø)
...core/src/query/visitors/ExtractInfoExprVisitor.cpp 100.00% <100.00%> (ø)
... and 2 more

... and 185 files with indirect coverage changes

@mergify
Copy link
Contributor

mergify bot commented Apr 26, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 26, 2023

@yah01 ut workflow job failed, comment rerun ut can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 26, 2023

@yah01 ut workflow job failed, comment rerun ut can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 26, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@sre-ci-robot sre-ci-robot added size/XL Denotes a PR that changes 500-999 lines. and removed size/L Denotes a PR that changes 100-499 lines. labels Apr 27, 2023
@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

1 similar comment
@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@yah01 yah01 force-pushed the json-expr branch 4 times, most recently from b5b4b9d to 71095cd Compare April 27, 2023 10:14
@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

@yah01 ut workflow job failed, comment rerun ut can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

@yah01 ut workflow job failed, comment rerun ut can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@yah01 yah01 force-pushed the json-expr branch 2 times, most recently from da4cb0e to d6ea092 Compare April 28, 2023 04:31
@mergify
Copy link
Contributor

mergify bot commented Apr 28, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@jiaoew1991
Copy link
Contributor

/lgtm
/approve

@mergify
Copy link
Contributor

mergify bot commented Apr 28, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 28, 2023

@yah01 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Apr 28, 2023

@yah01 ut workflow job failed, comment rerun ut can trigger the job again.

Signed-off-by: yah01 <yang.cen@zilliz.com>
@jiaoew1991
Copy link
Contributor

/lgtm
/approve

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiaoew1991, yah01

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

@jiaoew1991 jiaoew1991 added ci-passed manual-pass manually set pass before ci-passed labeled labels Apr 30, 2023
@sre-ci-robot sre-ci-robot merged commit 62eea52 into milvus-io:master Apr 30, 2023
@@ -76,10 +76,12 @@ VectorBase::set_data_raw(ssize_t element_offset,
}
case DataType::JSON: {
auto& json_data = FIELD_DATA(data, json);
std::vector<Json> data_raw(json_data.size());
std::vector<Json> data_raw{};
data_raw.reserve(json_data.size());
for (auto& json_bytes : json_data) {
data_raw.emplace_back(simdjson::padded_string(json_bytes));
Copy link
Collaborator

Choose a reason for hiding this comment

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

try to use simdjson::minify to save memory?

Copy link
Member Author

Choose a reason for hiding this comment

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

User may hope to retrieve the original data without any modification, so keep this unchanged here

exist(std::vector<std::string> nested_path) const {
std::for_each(
nested_path.begin(), nested_path.end(), [](std::string& key) {
boost::replace_all(key, "~", "~0");
Copy link
Collaborator

Choose a reason for hiding this comment

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

leave the comment here, make sure code reviewer understand it's the requirement of simdJson

#include "query/ExprImpl.h"
#include "query/Relational.h"
#include "query/Utils.h"
#include "segcore/SegmentGrowingImpl.h"
#include "simdjson/error.h"

namespace milvus::query {
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems we don't support exist for now right

Copy link
Member Author

Choose a reason for hiding this comment

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

@xiaocai2333 will support exist expression, this pr provides the exist() method in Json class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/feature Issues related to feature request from users lgtm manual-pass manually set pass before ci-passed labeled size/XL Denotes a PR that changes 500-999 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants