-
Notifications
You must be signed in to change notification settings - Fork 449
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
Changes from 16 commits
eefda74
cd818b8
81a081f
444df6e
7d7fc2e
e84b2c2
334b842
2ddc8fd
442ba5f
8f9864c
1d4c7bf
d2ed92c
77e07d4
29f334a
39df35c
a7667b6
5a129d3
fe47738
f28d810
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can the following code be replaced with params.ha_labels()? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
if !self.query_params.labels.is_empty() && entry.label().is_some() { | ||
if !self | ||
.query_params | ||
.labels | ||
.contains(&entry.label().unwrap()) | ||
{ | ||
// pruning by labels | ||
return Ok(None); | ||
} else if self.query_params.filter.is_none() && self.query_params.columns.is_none() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use has_predicates & has_columns? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
// if only filter by labels, directly return the results. | ||
return Ok(Some(input)); | ||
} | ||
} | ||
// 2. further fetch properties, e.g., filter by columns. | ||
// 2. Otherwise, filter after query store, e.g., the case of filter by columns. | ||
match entry.get_type() { | ||
EntryType::Vertex => { | ||
let graph = get_graph().ok_or_else(|| FnExecError::NullGraphError)?; | ||
|
@@ -248,7 +253,7 @@ impl FilterMapFuncGen for pb::GetV { | |
VOpt::Start | VOpt::End | VOpt::Other => { | ||
let mut tables_condition: Vec<LabelId> = vec![]; | ||
if let Some(params) = self.params { | ||
if params.is_queryable() { | ||
if params.has_predicates() || params.has_columns() { | ||
Err(FnGenError::unsupported_error(&format!("QueryParams in GetV {:?}", params)))? | ||
} else { | ||
tables_condition = params | ||
|
There was a problem hiding this comment.
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()?
There was a problem hiding this comment.
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).