-
Notifications
You must be signed in to change notification settings - Fork 448
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 bugs when try to get labels or properties from an None entry #4341
Conversation
Please check the preview of the documentation changes at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4341 +/- ##
===========================================
- Coverage 58.78% 34.33% -24.45%
===========================================
Files 12 126 +114
Lines 592 13257 +12665
===========================================
+ Hits 348 4552 +4204
- Misses 244 8705 +8461 see 126 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
})? | ||
} else { | ||
Object::None | ||
if let Some(graph_element) = element.as_graph_element() { |
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.
Fix the implementation such that calling as_graph_element() from an None object can return a special object that have implementation of getting None value from any properties?
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.
Done. Introduced a `NullGraphEntry' for a null graph element.
@@ -158,7 +158,8 @@ impl FilterMapFunction<Record, Record> for AuxiliaOperator { | |||
// then we set tag=None and alias="a" in auxilia | |||
|
|||
// 1. If to filter by labels, and the entry itself carries label information already, directly eval it without query the store | |||
if self.query_params.has_labels() && entry.label().is_some() { | |||
if self.query_params.has_labels() && entry.as_graph_path().is_some() && entry.label().is_some() |
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.
Fix this if condition when verifying the special implementation for None object.
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.
Done.
98a37fd
to
79fc4ab
Compare
@@ -51,6 +52,8 @@ pub enum EntryType { | |||
Intersection, | |||
/// Type of collection consisting of entries | |||
Collection, | |||
/// A Null graph element entry type | |||
NullGraphType, |
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.
Null
or NullEntity
is a better name. Because in other items, you did not say VertexType, or EdgeType,
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.
Done.
|
||
impl_as_any!(NullGraphEntry); | ||
|
||
impl Entry for NullGraphEntry { |
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.
NullEntry
is fine.
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.
Done.
What do these changes do?
As titled.
Related issue number
Fixes #4340