private String createVertices() {
TypeAndPropertyKeyStore typeAndPropertyKeyStore = TypeAndPropertyKeyStore.getInstance();
for (QueryVariable queryVariable : structuredQuery.getQueryVariables()) {
Map<String, Pair<String, String>> stringVertexProperties = queryVariable.
getVariableProperties();
typeAndPropertyKeyStore.assertExistingKeyDataTypesMatchPreviousDeclarations(
stringVertexProperties);
int vertexId = Integer.parseInt(queryVariable.getVariableName());
short vertexType = typeAndPropertyKeyStore.mapStringTypeToShortOrInsert(queryVariable.
getVariableType());
Map<Short, Pair<DataType, String>> vertexProperties = typeAndPropertyKeyStore.
mapStringPropertiesToShortAndDataTypeOrInsert(stringVertexProperties);
Graph.getInstance().addVertex(vertexId, vertexType, vertexProperties);
}
// TODO(amine): bug, count the actual number of vertices created to append to sink.
return structuredQuery.getQueryVariables().size() + " vertices created.";
}
CreateQueryPlan.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:graphflow
作者:
评论列表
文章目录