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

refactor(interactive): Improve the code of checking if a given label sets contain all labels in the schema #3374

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

longbinlai
Copy link
Collaborator

Improve the performance of checking if a given label sets contain all labels in the schema

@@ -1502,7 +1504,7 @@ fn is_params_all_labels(params: &pb::QueryParams) -> bool {
.as_ref()
.and_then(|store_meta| store_meta.schema.as_ref())
{
let params_label_ids: BTreeSet<LabelId> = params
let params_label_ids: Vec<LabelId> = params
Copy link
Collaborator

@BingqingLyu BingqingLyu Nov 23, 2023

Choose a reason for hiding this comment

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

Params may carry duplicated tables in Gremlin for now. e.g., g.V().hasLabel("PERSON","PERSON","SOFTWARE"),
params.tables will contain duplicated label ids of 1, representing "PERSON".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2023

Codecov Report

Merging #3374 (0fc6220) into main (72b5cdc) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3374   +/-   ##
=======================================
  Coverage   41.04%   41.04%           
=======================================
  Files         109      109           
  Lines       11298    11298           
=======================================
  Hits         4637     4637           
  Misses       6661     6661           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72b5cdc...0fc6220. Read the comment docs.

Copy link
Collaborator

@BingqingLyu BingqingLyu left a comment

Choose a reason for hiding this comment

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

LGTM.

@longbinlai longbinlai merged commit c237328 into alibaba:main Nov 23, 2023
28 of 29 checks passed
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.

None yet

3 participants