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(interactive): fix the bug in filtering after intersection in GIE Runtime in distributed computation #3359

Merged
merged 19 commits into from
Nov 22, 2023

Conversation

BingqingLyu
Copy link
Collaborator

@BingqingLyu BingqingLyu commented Nov 16, 2023

What do these changes do?

This pr:

  1. fix the bug in filtering after intersection in distributed computation;
  2. optimize the case of filtering by label only that doesn't necessary to query the storage, in Auxilia operator.

Related issue number

Fixes #3360

Committed-by: bingqing.lbq from Dev container
Committed-by: bingqing.lbq from Dev container
@BingqingLyu BingqingLyu changed the title fix(Interactive): fix the bug in filtering after intersection in GIE Runtime in distributed computation fix(interactive): fix the bug in filtering after intersection in GIE Runtime in distributed computation Nov 16, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2023

Codecov Report

Merging #3359 (77e07d4) into main (2657681) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3359   +/-   ##
=======================================
  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 2657681...77e07d4. Read the comment docs.

// is_queryable doesn't consider tables as we assume that the table info can be inferred directly from current data.
pub fn is_queryable(&self) -> bool {
!(self.filter.is_none()
&& self.limit.is_none()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why we need to consider limit and sample_ratio then. And if this is the case, directly using ! ( self.filter.is_none() && self.columns.is_none()) without introducing this arbitrary function is a better idea.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

BingqingLyu and others added 7 commits November 21, 2023 03:55
Committed-by: bingqing.lbq from Dev container
Committed-by: bingqing.lbq from Dev container
Committed-by: bingqing.lbq from Dev container
@@ -159,17 +159,22 @@ impl FilterMapFunction<Record, Record> for AuxiliaOperator {
// e.g., for g.V().out().as("a").has("name", "marko"), we should compile as:
// g.V().out().auxilia(as("a"))... where we give alias in auxilia,
// then we set tag=None and alias="a" in auxilia
// 1. filter by labels.

// 1. If to filter by labels, and the entry itself carries label information already, directly eval it without query the store
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can the following code be replaced with params.ha_labels()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

return Ok(None);
} else if self.query_params.filter.is_none() && self.query_params.columns.is_none() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use has_predicates & has_columns?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

|| params.has_predicates()
|| params.has_sample()
|| params.has_limit())
&& is_params_all_labels(params)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can is_params_all_labels be replaced with params.has_labels()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe not. Here we have to confirm it is the "whole graph", that it either specifies all labels, or no labels (also indicates that all labels is allowed).

Copy link
Collaborator

@longbinlai longbinlai 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 72b5cdc into alibaba:main Nov 22, 2023
47 checks passed
@BingqingLyu BingqingLyu deleted the ir_fix_auxilia branch November 22, 2023 11:09
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.

[BUG] unexpected results of filtering after intersection in GIE Runtime in distributed computation
4 participants