hugegraph-spark-connector/src/main/java/org/apache/hugegraph/spark/connector/builder/EdgeBuilder.java [168:192]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private VertexIdsIndex extractVertexIdsIndex(String[] names) {
        VertexIdsIndex index = new VertexIdsIndex();
        index.sourceIndexes = new int[this.mapping.sourceFields().size()];
        int idx = 0;
        for (String field : this.mapping.sourceFields()) {
            for (int pos = 0; pos < names.length; pos++) {
                String name = names[pos];
                if (field.equals(name)) {
                    index.sourceIndexes[idx++] = pos;
                }
            }
        }

        index.targetIndexes = new int[this.mapping.targetFields().size()];
        idx = 0;
        for (String field : this.mapping.targetFields()) {
            for (int pos = 0; pos < names.length; pos++) {
                String name = names[pos];
                if (field.equals(name)) {
                    index.targetIndexes[idx++] = pos;
                }
            }
        }
        return index;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



hugegraph-loader/src/main/java/org/apache/hugegraph/loader/builder/EdgeBuilder.java [240:264]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private VertexIdsIndex extractVertexIdsIndex(String[] names) {
        VertexIdsIndex index = new VertexIdsIndex();
        index.sourceIndexes = new int[this.mapping.sourceFields().size()];
        int idx = 0;
        for (String field : this.mapping.sourceFields()) {
            for (int pos = 0; pos < names.length; pos++) {
                String name = names[pos];
                if (field.equals(name)) {
                    index.sourceIndexes[idx++] = pos;
                }
            }
        }

        index.targetIndexes = new int[this.mapping.targetFields().size()];
        idx = 0;
        for (String field : this.mapping.targetFields()) {
            for (int pos = 0; pos < names.length; pos++) {
                String name = names[pos];
                if (field.equals(name)) {
                    index.targetIndexes[idx++] = pos;
                }
            }
        }
        return index;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



