Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(interactive): Revise the Storage interface on which the interactive query engine is built. #4028

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
8 changes: 8 additions & 0 deletions flex/bin/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
for i in 1 2 3 4 5 6 7 8 9 10 11 12;
do
cmd="./load_plan_and_gen.sh -e=hqps -i=../resources/queries/ic/adhoc/ic${i}_adhoc.cypher -w=/tmp/codegen/"
cmd=${cmd}" -o=/tmp/plugin --ir_conf=../tests/hqps/engine_config_test.yaml "
cmd=${cmd}" --graph_schema_path=${INTERACTIVE_WORKSPACE}/data/ldbc/graph.yaml"
echo $cmd
eval ${cmd} || exit 1
done
6 changes: 2 additions & 4 deletions flex/codegen/src/building_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static constexpr const char* time_stamp = "time_stamp";
static constexpr const char* graph_var = "graph";
static constexpr const char* GRAPE_INTERFACE_CLASS = "gs::MutableCSRInterface";
static constexpr const char* GRAPE_INTERFACE_HEADER =
"flex/engines/hqps_db/database/mutable_csr_interface.h";
"flex/engines/hqps_db/database/mutable_csr_interface_v2.h";
static constexpr const char* EDGE_EXPAND_OPT_NAME = "edge_expand_opt";
static constexpr const char* SORT_OPT_NAME = "sort_opt";
static constexpr const char* GET_V_OPT_NAME = "get_v_opt";
Expand Down Expand Up @@ -126,9 +126,7 @@ struct TagIndMapping {
tag_id_2_tag_inds_[tag_id] != -1;
}

int32_t GetMaxTagId() const {
return tag_id_2_tag_inds_.size() - 1;
}
int32_t GetMaxTagId() const { return tag_id_2_tag_inds_.size() - 1; }

// convert tag_ind (us) to tag ids
std::vector<int32_t> tag_ind_2_tag_ids_;
Expand Down
1 change: 0 additions & 1 deletion flex/codegen/src/hqps_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ static constexpr const char* QUERY_TEMPLATE_STR =
" using Engine = SyncEngine<%4%>;\n"
" using label_id_t = typename %4%::label_id_t;\n"
" using vertex_id_t = typename %4%::vertex_id_t;\n"
" using gid_t = typename %4%::gid_t;\n"
" // constructor\n"
" %3%() {}\n"
"// Query function for query class\n"
Expand Down
140 changes: 38 additions & 102 deletions flex/engines/hqps_db/core/operator/edge_expand.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "flex/engines/hqps_db/core/utils/hqps_utils.h"

#include "flex/engines/hqps_db/core/utils/graph_utils.h"
#include "flex/engines/hqps_db/structures/multi_edge_set/adj_edge_set.h"
#include "flex/engines/hqps_db/structures/multi_edge_set/flat_edge_set.h"
#include "flex/engines/hqps_db/structures/multi_edge_set/general_edge_set.h"
Expand Down Expand Up @@ -182,7 +183,7 @@
if (state.direction_ == Direction::In ||
state.direction_ == Direction::Both) {
auto tmp_nbr_list_array = state.graph_.GetOtherVertices(
src_label, dst_label, state.edge_label_, cur_vids, "In",
src_label, dst_label, state.edge_label_, cur_vids, Direction::In,
state.limit_);

CHECK(tmp_nbr_list_array.size() == active_inds.size());
Expand All @@ -196,7 +197,7 @@
if (state.direction_ == Direction::Out ||
state.direction_ == Direction::Both) {
auto tmp_nbr_list_array = state.graph_.GetOtherVertices(
src_label, dst_label, state.edge_label_, cur_vids, "Out",
src_label, dst_label, state.edge_label_, cur_vids, Direction::Out,
state.limit_);

CHECK(tmp_nbr_list_array.size() == active_inds.size());
Expand Down Expand Up @@ -284,8 +285,8 @@
<< ",dst: " << std::to_string(dst_label)
<< ",dire: " << state.direction_;
auto tmp_nbr_list_array = state.graph_.GetOtherVertices(
src_label, dst_label, state.edge_label_, cur_vids,
gs::to_string(state.direction_), state.limit_);
src_label, dst_label, state.edge_label_, cur_vids, state.direction_,
state.limit_);
// nbr_lists.emplace_back(std::move(nbr_list_array));

CHECK(tmp_nbr_list_array.size() == active_inds.size());
Expand Down Expand Up @@ -627,9 +628,9 @@
<< ", src label: " << gs::to_string(raw_src_label)
<< ", dst label: " << gs::to_string(raw_dst_label)
<< ", direction: " << gs::to_string(direction);
auto vid_and_offset1 = graph.GetOtherVerticesV2(
raw_src_label, raw_dst_label, edge_label,
cur_vertex_set.GetVertices(), gs::to_string(direction), INT_MAX);
auto vid_and_offset1 = get_other_vertices_in_batch(
graph, raw_src_label, raw_dst_label, edge_label,
cur_vertex_set.GetVertices(), direction);
VLOG(10) << ", vid_and_offset1 size: " << vid_and_offset1.first.size()
<< ", vid_and_offset1 offset size: "
<< vid_and_offset1.second.size();
Expand All @@ -649,7 +650,7 @@
auto [vids, active_inds] = cur_vertex_set.GetVertices(j);
auto tmp_nbr_list_array =
graph.GetOtherVertices(raw_src_label, raw_dst_label, edge_label,
vids, gs::to_string(direction), INT_MAX);
vids, direction, INT_MAX);
for (size_t k = 0; k < active_inds.size(); ++k) {
auto dst_ind = active_inds[k];
CHECK(nbr_list_array.get(dst_ind).size() == 0);
Expand Down Expand Up @@ -887,11 +888,15 @@
for (size_t i = 0; i < edge_labels.size(); ++i) {
// Check whether the edge triplet match input vertices.
// return a handler to get edges
auto sub_graph_vec = graph.GetSubGraph(
edge_labels[i][0], edge_labels[i][1], edge_labels[i][2],
gs::to_string(direction), prop_names_vec[i]);
for (auto sub_graph : sub_graph_vec) {
sub_graphs.emplace_back(sub_graph);
if (direction == Direction::Both || direction == Direction::Out) {
sub_graphs.emplace_back(
graph.GetSubGraph(edge_labels[i][0], edge_labels[i][1],
edge_labels[i][2], Direction::Out));
}
if (direction == Direction::Both || direction == Direction::In) {
sub_graphs.emplace_back(
graph.GetSubGraph(edge_labels[i][0], edge_labels[i][1],
edge_labels[i][2], Direction::In));
}
}

Expand Down Expand Up @@ -977,139 +982,143 @@
typename std::enable_if<(VERTEX_SET_T::is_general_set ||
VERTEX_SET_T::is_two_label_set)>::type* =
nullptr>
static auto EdgeExpandEMultiTriplet(
const GRAPH_INTERFACE& graph, const VERTEX_SET_T& cur_vertex_set,
Direction& direction,
std::array<std::array<label_id_t, 3>, num_pairs>& edge_labels,
std::tuple<PropTupleArrayT<PropTuple>...>& prop_names,
Filter<TruePredicate>&& edge_filter, size_t limit) {
// Expand from multi label vertices and though multi edge labels.
// result in general edge set.
std::vector<label_id_t> label_vec;
{
auto labels = cur_vertex_set.GetLabels();
label_vec.reserve(labels.size());
for (size_t i = 0; i < labels.size(); ++i) {
label_vec.emplace_back(labels[i]);
}
}

// for each triplet, returns a vector of edge iters.
auto& vertices = cur_vertex_set.GetVertices();
using sub_graph_t = typename GRAPH_INTERFACE::sub_graph_t;
using edge_iter_t = typename sub_graph_t::iterator;
std::vector<sub_graph_t> sub_graphs;
auto prop_names_vec = prop_names_to_vec<PropTuple...>(prop_names);
for (size_t i = 0; i < edge_labels.size(); ++i) {
// Check whether the edge triplet match input vertices.
// return a handler to get edges
auto sub_graph_vec = graph.GetSubGraph(
edge_labels[i][0], edge_labels[i][1], edge_labels[i][2],
gs::to_string(direction), prop_names_vec[i]);
for (auto sub_graph : sub_graph_vec) {
sub_graphs.emplace_back(sub_graph);
if (direction == Direction::Both || direction == Direction::Out) {
sub_graphs.emplace_back(
graph.GetSubGraph(edge_labels[i][0], edge_labels[i][1],
edge_labels[i][2], Direction::Out));
}
if (direction == Direction::Both || direction == Direction::In) {
sub_graphs.emplace_back(
graph.GetSubGraph(edge_labels[i][0], edge_labels[i][1],
edge_labels[i][2], Direction::In));
}
}

std::vector<std::array<label_t, 3>> label_triplets;
// each vertex.
// generating offsets array
{
label_triplets.reserve(edge_labels.size());
for (size_t i = 0; i < edge_labels.size(); ++i) {
label_triplets.emplace_back(edge_labels[i]);
}
VLOG(10) << "[EdgeExpandEMultiTriplet] label triplets: ";
for (size_t i = 0; i < label_triplets.size(); ++i) {
std::stringstream ss;
ss << std::to_string(label_triplets[i][0]) << " "
<< std::to_string(label_triplets[i][1]) << " "
<< std::to_string(label_triplets[i][2]);
VLOG(10) << ss.str();
}
}

std::vector<uint8_t> label_indices = cur_vertex_set.GenerateLabelIndices();
std::unordered_map<label_id_t, std::vector<sub_graph_t>> label_to_subgraphs;
{
// generate label_to_subgraphs
for (size_t i = 0; i < label_vec.size(); ++i) {
label_to_subgraphs.emplace(label_vec[i], std::vector<sub_graph_t>());
}

for (size_t i = 0; i < sub_graphs.size(); ++i) {
auto cur_src_label = sub_graphs[i].GetSrcLabel();
if (std::find(label_vec.begin(), label_vec.end(), cur_src_label) !=
label_vec.end()) {
label_to_subgraphs[cur_src_label].emplace_back(sub_graphs[i]);
}
}
}
VLOG(10) << "[EdgeExpandEMultiTriplet] label_to_subgraphs size: "
<< label_to_subgraphs.size();

std::vector<offset_t> offsets;
{
// generate offset_array
std::vector<std::vector<edge_iter_t>> grouped_edge_iters(vertices.size());
for (size_t i = 0; i < label_vec.size(); ++i) {
auto cur_src_label = label_vec[i];
// for all this type of vertices, emplace back subgraph
auto& real_sub_graphs = label_to_subgraphs[cur_src_label];
for (size_t k = 0; k < vertices.size(); ++k) {
if (label_indices[k] != i) {
continue;
}

for (size_t j = 0; j < real_sub_graphs.size(); ++j) {
auto cur_edges = real_sub_graphs[j].get_edges(vertices[k]);
VLOG(10) << "vid index: " << k << " label ind: " << i
<< " cur label: " << gs::to_string(cur_src_label)
<< " real subgraphs:[" << j << "]: " << cur_edges.Size();
grouped_edge_iters[k].emplace_back(cur_edges);
}
}
}
offsets.reserve(vertices.size() + 1);
offsets.emplace_back(0);
size_t cur_cnt = 0;
for (size_t i = 0; i < vertices.size(); ++i) {
auto& iters = grouped_edge_iters[i];
for (size_t j = 0; j < iters.size(); ++j) {
cur_cnt += iters[j].Size();
}
offsets.emplace_back(cur_cnt);
}
VLOG(10) << "[EdgeExpandEMultiTriplet] offsets: "
<< gs::to_string(offsets);
LOG(INFO) << "total edge found: " << cur_cnt;
}

auto set = UnTypedEdgeSet<vertex_id_t, label_id_t, sub_graph_t>(
vertices, label_indices, label_vec, std::move(label_to_subgraphs),
direction);
return std::make_pair(std::move(set), std::move(offsets));
}

/// @brief Expand from multi label vertices and though multi edge labels, With
/// Expression.
/// @tparam ...PropTuple
/// @tparam ...SET_T
/// @tparam num_pairs
/// @param graph
/// @param cur_vertex_set
/// @param direction
/// @param edge_labels
/// @param prop_names
/// @param edge_filter
/// @param limit
/// @return /
template <
size_t num_pairs, typename... PropTuple, typename VERTEX_SET_T,
typename EXPR, typename... SELECTOR,
typename std::enable_if<((VERTEX_SET_T::is_general_set ||
VERTEX_SET_T::is_two_label_set) &&
!IsTruePredicate<EXPR>::value)>::type* = nullptr>

Check notice on line 1121 in flex/engines/hqps_db/core/operator/edge_expand.h

View check run for this annotation

codefactor.io / CodeFactor

flex/engines/hqps_db/core/operator/edge_expand.h#L985-L1121

Complex Method
static auto EdgeExpandEMultiTriplet(
const GRAPH_INTERFACE& graph, const VERTEX_SET_T& cur_vertex_set,
Direction& direction,
Expand Down Expand Up @@ -1156,27 +1165,6 @@
return std::make_pair(std::move(new_set), std::move(old_offset));
}

// for input vertex set with only one label.
template <typename... T, typename... SET_T, typename EDGE_FILTER_T,
typename std::enable_if<sizeof...(T) == 0>::type* = nullptr,
typename RES_T = std::pair<AdjEdgeSet<GRAPH_INTERFACE, vertex_id_t,
label_id_t, grape::EmptyType>,
std::vector<offset_t>>>
static RES_T EdgeExpandE(
const GRAPH_INTERFACE& graph,
RowVertexSet<label_id_t, vertex_id_t, SET_T...>& cur_vertex_set,
Direction direction, label_id_t edge_label, label_id_t other_label,
EDGE_FILTER_T& edge_filter, PropNameArray<T...>& props,
size_t limit = INT_MAX) {
auto state =
EdgeExpandEState<GRAPH_INTERFACE,
RowVertexSet<label_id_t, vertex_id_t, SET_T...>,
EDGE_FILTER_T>(graph, cur_vertex_set, direction,
edge_label, other_label, props,
edge_filter, limit);

return EdgeExpandENoPropImpl(state);
}
// EdgeExpandE when input vertex are single label. and get multiple props
// Currently only support one edge property
template <typename T, typename... SET_T, typename EDGE_FILTER_T,
Expand Down Expand Up @@ -1318,8 +1306,7 @@
<< ",direction: " << state.direction_;
auto nbr_list_array = state.graph_.GetOtherVertices(
src_label, dst_label, state.edge_label_,
state.cur_vertex_set_.GetVertices(), gs::to_string(state.direction_),
state.limit_);
state.cur_vertex_set_.GetVertices(), state.direction_, state.limit_);
std::vector<vertex_id_t> vids;
std::vector<offset_t> offset;
offset.reserve(state.cur_vertex_set_.Size() + 1);
Expand All @@ -1339,15 +1326,14 @@
return pair;
}

template <typename VERTEX_SET_T, typename... EDATA_T>
template <typename VERTEX_SET_T, typename EDATA_T>
static void fetch_adj_list_array_from_graph(
const GRAPH_INTERFACE& graph, const VERTEX_SET_T& vertex_set,
Direction direction, label_id_t edge_label, label_id_t other_label,
PropNameArray<EDATA_T...>& prop_names, int32_t limit,
typename GRAPH_INTERFACE::template adj_list_array_t<EDATA_T...>&
PropNameArray<EDATA_T>& prop_names, int32_t limit,
typename GRAPH_INTERFACE::template adj_list_array_t<EDATA_T>&
res_adj_list_arrays) {
auto num_labels = vertex_set.GetLabels().size();
auto direction_str = gs::to_string(direction);
label_id_t src_label, dst_label;
for (size_t i = 0; i < num_labels; ++i) {
if (direction == Direction::In) {
Expand All @@ -1371,9 +1357,8 @@
std::vector<vertex_id_t> cur_vids;
std::vector<int32_t> cur_active_inds;
std::tie(cur_vids, cur_active_inds) = vertex_set.GetVertices(i);
auto tmp = graph.template GetEdges<EDATA_T...>(
src_label, dst_label, edge_label, cur_vids, direction_str, limit,
prop_names);
auto tmp = graph.template GetEdges<EDATA_T>(
src_label, dst_label, edge_label, cur_vids, direction, limit);
CHECK(tmp.size() == cur_active_inds.size());
if (i == 0) {
// first time, update flag field.
Expand Down Expand Up @@ -1576,17 +1561,15 @@
state.direction_ == Direction::Both) {
auto adj_list_array = state.graph_.template GetEdges<T>(
src_label, dst_label, state.edge_label_,
state.cur_vertex_set_.GetVertices(), gs::to_string(Direction::Out),
state.limit_, prop_names);
state.cur_vertex_set_.GetVertices(), Direction::Out, state.limit_);
adj_list_array_vec.emplace_back(
std::make_pair(std::move(adj_list_array), Direction::Out));
}
if (state.direction_ == Direction::In ||
state.direction_ == Direction::Both) {
auto adj_list_array = state.graph_.template GetEdges<T>(
src_label, dst_label, state.edge_label_,
state.cur_vertex_set_.GetVertices(), gs::to_string(Direction::In),
state.limit_, prop_names);
state.cur_vertex_set_.GetVertices(), Direction::In, state.limit_);
adj_list_array_vec.emplace_back(
std::make_pair(std::move(adj_list_array), Direction::In));
}
Expand Down Expand Up @@ -1646,51 +1629,6 @@
return filter(std::get<Is>(props)...);
}

// EdgeExpandE for single label input vertex set.
template <typename... SET_T, typename EDGE_FILTER_T>
static auto EdgeExpandENoPropImpl(
EdgeExpandEState<GRAPH_INTERFACE,
RowVertexSet<label_id_t, vertex_id_t, SET_T...>,
EDGE_FILTER_T>& state) {
// no prop.
auto prop_names = state.prop_names_;
label_id_t src_label, dst_label;
if (state.direction_ == Direction::In) {
src_label = state.other_label_;
dst_label = state.cur_vertex_set_.GetLabel();
} else {
src_label = state.cur_vertex_set_.GetLabel();
dst_label = state.other_label_;
}
LOG(INFO) << "[EdgeExpandENoPropImpl] for single label vertex set. "
<< (int) src_label << " " << (int) dst_label;
auto adj_list_array = state.graph_.template GetEdges<>(
src_label, dst_label, state.edge_label_,
state.cur_vertex_set_.GetVertices(), gs::to_string(state.direction_),
state.limit_, prop_names);
LOG(INFO) << "after get edges";
std::vector<offset_t> offset;
offset.reserve(state.cur_vertex_set_.Size() + 1);
size_t size = 0;
size_t adj_list_ind = 0;
offset.emplace_back(size);
// Construct offset from adj_list.
for (auto iter : state.cur_vertex_set_) {
auto edges = adj_list_array.get(adj_list_ind);
size += edges.size(); // number of edges in this AdjList
offset.emplace_back(size);
adj_list_ind++;
}
LOG(INFO) << "total size of edges: " << size;
auto copied_vids(state.cur_vertex_set_.GetVertices());
auto edge_set =
AdjEdgeSet<GRAPH_INTERFACE, vertex_id_t, label_id_t, grape::EmptyType>(
std::move(copied_vids), std::move(adj_list_array),
state.edge_label_, state.cur_vertex_set_.GetLabel(),
state.other_label_, array_to_vec(prop_names), state.direction_);
return std::make_pair(std::move(edge_set), std::move(offset));
}

// only support one property
template <typename LabelT, typename VERTEX_SET_T, typename EDGE_FILTER_T,
typename T>
Expand All @@ -1711,8 +1649,7 @@
std::array<std::string, 1> prop_names = {selector.prop_name_};
auto adj_list_array = state.graph_.template GetEdges<T>(
src_label, dst_label, state.edge_label_,
state.cur_vertex_set_.GetVertices(), gs::to_string(state.direction_),
state.limit_, prop_names);
state.cur_vertex_set_.GetVertices(), state.direction_, state.limit_);
return adj_list_array;
}

Expand All @@ -1726,9 +1663,8 @@
CHECK(direction != Direction::Both);
std::vector<vertex_id_t> dst_vertices;
std::vector<size_t> tmp_offset;
std::tie(dst_vertices, tmp_offset) =
graph.GetOtherVerticesV2(src_label_id, dst_label_id, edge_label_id,
src_v, gs::to_string(direction), INT_MAX);
std::tie(dst_vertices, tmp_offset) = get_other_vertices_in_batch(
graph, src_label_id, dst_label_id, edge_label_id, src_v, direction);
// put these vertices into tmp_nbr_vertices
label_id_t label_id;
if (direction == Direction::Out) {
Expand Down
10 changes: 5 additions & 5 deletions flex/engines/hqps_db/core/operator/get_v.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ class GetVertex {
for (size_t i = 0; i < num_labels; ++i) {
auto& cur_set = multi_set.GetSet(i);
VLOG(10) << "set: " << i << ", size: " << cur_set.Size();
res_data_tuples[i] = graph.template GetVertexPropsFromVid<T...>(
cur_set.GetLabel(), cur_set.GetVertices(), props);
res_data_tuples[i] = get_vertex_props_from_vids<GRAPH_INTERFACE, T...>(
graph, cur_set.GetLabel(), cur_set.GetVertices(), props);
}
VLOG(10) << "Finish get data tuples";
auto set_array = std::array<res_set_t, num_labels>{make_row_vertex_set(
Expand Down Expand Up @@ -301,9 +301,9 @@ class GetVertex {
const GRAPH_INTERFACE& graph, std::array<LabelT, num_labels>& labels,
Filter<EXPRESSION, SELECTOR...>& filter,
const RowVertexSet<LabelT, vertex_id_t, V_SET_T...>& set) {
// TODO: support for multiple selectors
auto property_getters_array = std::array{get_prop_getter_from_selectors(
graph, set.GetLabel(), filter.selectors_)};
auto property_getters_array =
std::array{get_prop_getters_from_selectors_single_label(
graph, set.GetLabel(), filter.selectors_)};
return set.project_vertices(labels, filter.expr_, property_getters_array);
}

Expand Down
20 changes: 10 additions & 10 deletions flex/engines/hqps_db/core/operator/path_expand.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ limitations under the License.
#include <string>

#include "flex/engines/hqps_db/core/params.h"
#include "flex/engines/hqps_db/core/utils/graph_utils.h"
#include "flex/engines/hqps_db/core/utils/hqps_utils.h"
#include "flex/engines/hqps_db/structures/multi_vertex_set/row_vertex_set.h"
#include "flex/engines/hqps_db/structures/path.h"
Expand Down Expand Up @@ -186,8 +187,8 @@ class PathExpand {
graph, cur_label, vertex_set.GetVertices(), range, edge_expand_opt);

auto& vids_vec = std::get<0>(tuple);
auto tuple_vec = graph.template GetVertexPropsFromVid<T...>(
cur_label, vids_vec, get_v_opt.props_);
auto tuple_vec = get_vertex_props_from_vids<GRAPH_INTERFACE, T...>(
graph, cur_label, vids_vec, get_v_opt.props_);
CHECK(tuple_vec.size() == vids_vec.size());
// prepend dist info.
auto new_tuple_vec =
Expand Down Expand Up @@ -488,9 +489,9 @@ class PathExpand {
double visit_array_time = 0.0;
for (size_t cur_hop = 1; cur_hop < range.limit_; ++cur_hop) {
double t0 = -grape::GetCurrentTime();
auto pair = graph.GetOtherVerticesV2(
real_src_label, dst_label, edge_expand_opt.edge_label_,
gids[cur_hop - 1], gs::to_string(edge_expand_opt.dir_), INT_MAX);
auto pair = get_other_vertices_in_batch(
graph, real_src_label, dst_label, edge_expand_opt.edge_label_,
gids[cur_hop - 1], edge_expand_opt.dir_);

gids[cur_hop].swap(pair.first);
CHECK(gids[cur_hop - 1].size() + 1 == pair.second.size());
Expand Down Expand Up @@ -705,9 +706,9 @@ class PathExpand {
auto& prev_other_vertices = other_vertices[i - 1];

std::tie(cur_other_vertices, cur_other_offsets) =
graph.GetOtherVerticesV2(src_label, edge_opt.other_label_,
edge_opt.edge_label_, prev_other_vertices,
gs::to_string(edge_opt.dir_), INT_MAX);
get_other_vertices_in_batch(graph, src_label, edge_opt.other_label_,
edge_opt.edge_label_, prev_other_vertices,
edge_opt.dir_);
VLOG(10) << "PathExpand at distance: " << i << ", got vertices: "
<< "size : " << cur_other_vertices.size();
}
Expand Down Expand Up @@ -865,8 +866,7 @@ class PathExpand {
}
auto cur_nbr_list = graph.GetOtherVertices(
real_src_label, real_dst_label, cur_edge_label,
other_vertices_for_cur_label, gs::to_string(direction),
INT_MAX);
other_vertices_for_cur_label, direction, INT_MAX);
{
size_t tmp_sum = 0;
for (size_t i = 0; i < cur_nbr_list.size(); ++i) {
Expand Down
Loading