-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat: support path in nGQL, optimized nGQL edge reader #133
Conversation
} else { | ||
LOG.error(s"Exception convert edge type ${valueType} ") | ||
throw new RuntimeException(" convert value type failed"); | ||
LOG.warn(s"Unexpected edge type ${valueType}. Skipping.") |
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.
Connector is an API not a tool, why just skip but not throw exception?
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.
make sense, was doing so due to some of the users are not familiar, or experienced enough to inspect error logs properly.
Will bring back the exception.
But we may need to handle NULL/Empty properly in such cases.
@@ -83,6 +83,12 @@ object NebulaConnectionConfig { | |||
/** | |||
* set connectionRetry, connectionRetry is optional | |||
*/ | |||
@deprecated("use withConnectionRetry instead", "3.7.0") |
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.
@Nicole00 could we do so to correct the typo?
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 put 4.0.0/5.0.0 here instead?
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.
update, after the rebase I realized I was doing this on the wrong base, but we should maintain the capability of the interface for a while, so keep this old typo for a while. Or it'll break things
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.
Agree! great idea.
@@ -70,12 +70,19 @@ class NebulaNgqlEdgePartitionReader extends InputPartitionReader[InternalRow] { | |||
val list: mutable.Buffer[ValueWrapper] = value.asList() | |||
edges.appendAll( | |||
list.toStream | |||
.filter(e => checkLabel(e.asRelationship())) | |||
.filter(e => e.isEdge() && checkLabel(e.asRelationship())) |
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.
This is helpful @Nicole00 to mitigate the case like NULL/EMPTY in List?
618b530
to
e0bacf7
Compare
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #133 +/- ##
============================================
+ Coverage 32.04% 36.35% +4.30%
- Complexity 79 92 +13
============================================
Files 31 31
Lines 1504 1513 +9
Branches 226 230 +4
============================================
+ Hits 482 550 +68
+ Misses 944 868 -76
- Partials 78 95 +17 ☔ View full report in Codecov by Sentry. |
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.
LGTM
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
close #132
Description:
We should not expect only edge or list of edges to be in resultSet for nGQL, this change fixes it.
How do you solve it?