Search in sources :

Example 1 with PropertyType

use of org.apache.tinkerpop.gremlin.structure.PropertyType in project GraphScope by alibaba.

the class TreeBuilder method visitPropertyMapStep.

private TreeNode visitPropertyMapStep(PropertyMapStep step, TreeNode prev) {
    Traversal.Admin<?, ?> propertyTraversal = step.getLocalChildren().isEmpty() ? null : (Traversal.Admin<?, ?>) step.getLocalChildren().get(0);
    TraversalRing<?, ?> traversalRing = ReflectionUtils.getFieldValue(PropertyMapStep.class, step, "traversalRing");
    if (null != propertyTraversal || !traversalRing.isEmpty()) {
        throw new UnsupportedOperationException("Not support value map with property traversal or traversal ring");
    }
    String[] propertyKeys = step.getPropertyKeys();
    PropertyType propertyType = step.getReturnType();
    return new PropertyMapTreeNode(prev, schema, propertyKeys, propertyType, step.getIncludedTokens() != 0);
}
Also used : CustomAggregationListTraversal(com.alibaba.maxgraph.sdkcommon.compiler.custom.aggregate.CustomAggregationListTraversal) Traversal(org.apache.tinkerpop.gremlin.process.traversal.Traversal) GraphTraversal(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal) PropertyType(org.apache.tinkerpop.gremlin.structure.PropertyType)

Aggregations

CustomAggregationListTraversal (com.alibaba.maxgraph.sdkcommon.compiler.custom.aggregate.CustomAggregationListTraversal)1 Traversal (org.apache.tinkerpop.gremlin.process.traversal.Traversal)1 GraphTraversal (org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal)1 PropertyType (org.apache.tinkerpop.gremlin.structure.PropertyType)1