Skip to content

Commit

Permalink
fix src label and dst label of edge kinds may be empty (#2153)
Browse files Browse the repository at this point in the history
  • Loading branch information
siyuan0322 committed Oct 24, 2022
1 parent 1b312af commit ea4ca1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void addListener(long snapshotId, SnapshotListener listener) {
*
* <p>Discussion:
*
* <p>We need to decide whether should the write framework coupled with the implementation of
* <p>We need to decide whether should the writing framework coupled with the implementation of
* schema synchronization. Options are discussed here:
* https://yuque.antfin-inc.com/graphscope/project/eibfty#EQGg9 This interface assumes write
* framework isn't coupled with schema synchronization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@
import com.alibaba.graphscope.groot.schema.request.DdlRequestBatch;
import com.alibaba.graphscope.proto.ddl.*;
import com.alibaba.maxgraph.compiler.api.schema.DataType;
import com.alibaba.maxgraph.sdkcommon.schema.EdgeKind;
import com.alibaba.maxgraph.sdkcommon.schema.*;
import com.alibaba.maxgraph.sdkcommon.schema.GraphDef;
import com.alibaba.maxgraph.sdkcommon.schema.PropertyDef;
import com.alibaba.maxgraph.sdkcommon.schema.PropertyValue;
import com.alibaba.maxgraph.sdkcommon.schema.TypeDef;
import com.alibaba.maxgraph.sdkcommon.schema.TypeEnum;
import com.google.protobuf.Any;
import com.google.protobuf.ByteString;

Expand Down Expand Up @@ -152,11 +148,15 @@ private GraphDefPb toGraphDefPb(GraphDef graphDef) {
.setEdgeLabelId(
LabelIdPb.newBuilder()
.setId(edgeKind.getEdgeLabelId().getId()))
.setSrcVertexLabel(edgeKind.getSrcVertexLabel())
.setSrcVertexLabel(
graphDef.getTypeDef(edgeKind.getSrcVertexLabelId())
.getLabel())
.setSrcVertexLabelId(
LabelIdPb.newBuilder()
.setId(edgeKind.getSrcVertexLabelId().getId()))
.setDstVertexLabel(edgeKind.getDstVertexLabel())
.setDstVertexLabel(
graphDef.getTypeDef(edgeKind.getDstVertexLabelId())
.getLabel())
.setDstVertexLabelId(
LabelIdPb.newBuilder()
.setId(edgeKind.getDstVertexLabelId().getId()))
Expand Down

0 comments on commit ea4ca1d

Please sign in to comment.