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 bugs when try to get labels or properties from an None entry #4341

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

BingqingLyu
Copy link
Collaborator

What do these changes do?

As titled.

Related issue number

Fixes #4340

Copy link
Contributor

github-actions bot commented Dec 3, 2024

Please check the preview of the documentation changes at
https://e20a9da2.graphscope-docs-preview.pages.dev

@codecov-commenter
Copy link

codecov-commenter commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.33%. Comparing base (4d7bd16) to head (e168bfe).
Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             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.

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

})?
} else {
Object::None
if let Some(graph_element) = element.as_graph_element() {
Copy link
Collaborator

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?

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. 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()
Copy link
Collaborator

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.

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.

@@ -51,6 +52,8 @@ pub enum EntryType {
Intersection,
/// Type of collection consisting of entries
Collection,
/// A Null graph element entry type
NullGraphType,
Copy link
Collaborator

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,

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.


impl_as_any!(NullGraphEntry);

impl Entry for NullGraphEntry {
Copy link
Collaborator

Choose a reason for hiding this comment

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

NullEntry is fine.

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.

@longbinlai longbinlai merged commit 086d7b1 into alibaba:main Dec 12, 2024
34 checks passed
@BingqingLyu BingqingLyu deleted the fix_for_bi_exp branch December 12, 2024 11:57
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] GIE fails in fetch properties after optional match
4 participants