Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ public static RelDataType getEdgeType(RelDataType graphPathType) {
return graphPathType;
}

public static String parseLabelValue(Common.Value value, GraphLabelType type) {
public static Object parseLabelValue(Common.Value value, GraphLabelType type) {
switch (value.getItemCase()) {
case NONE:
return null;
case STR:
return value.getStr();
case I32:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,14 @@ protected AnyValue parseGraphPath(IrResult.GraphPath path, @Nullable RelDataType

protected AnyValue parseValue(Common.Value value, @Nullable RelDataType dataType) {
if (dataType instanceof GraphLabelType) {
return Values.stringValue(Utils.parseLabelValue(value, (GraphLabelType) dataType));
Object labelValue = Utils.parseLabelValue(value, (GraphLabelType) dataType);
if (labelValue == null) {
return Values.NO_VALUE;
} else if (labelValue instanceof String) {
return Values.stringValue((String) labelValue);
} else {
return Values.stringValue(labelValue.toString());
}
}
switch (value.getItemCase()) {
case BOOLEAN:
Expand Down
Loading