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

feat: support path in nGQL, optimized nGQL edge reader #133

Merged
merged 14 commits into from
Dec 21, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,15 @@ class NebulaNgqlEdgePartitionReader extends InputPartitionReader[InternalRow] {
.filter(e => checkLabel(e.asRelationship()))
.map(e => convertToEdge(e.asRelationship(), properties))
)
} else if (valueType == Value.PVAL){
val list: mutable.Buffer[ValueWrapper] = value.asPath().getRelationships()
edges.appendAll(
list.toStream
.filter(e => checkLabel(e.asRelationship()))
.map(e => convertToEdge(e.asRelationship(), properties))
)
} else {
LOG.error(s"Exception convert edge type ${valueType} ")
throw new RuntimeException(" convert value type failed");
LOG.warn(s"Unexpected edge type ${valueType}. Skipping.")
Copy link
Contributor

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?

Copy link
Contributor Author

@wey-gu wey-gu Nov 22, 2023

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.

}
}
}
Expand Down
Loading