Skip to content

Commit

Permalink
delete adhoc app
Browse files Browse the repository at this point in the history
  • Loading branch information
liulx20 committed Jan 17, 2025
1 parent bec7146 commit 297fce5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 105 deletions.
2 changes: 0 additions & 2 deletions flex/engines/graph_db/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/app/app_base.h
DESTINATION include/flex/engines/graph_db/app)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/app/hqps_app.h
DESTINATION include/flex/engines/graph_db/app)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/app/adhoc_app.h
DESTINATION include/flex/engines/graph_db/app)


50 changes: 0 additions & 50 deletions flex/engines/graph_db/app/adhoc_app.cc

This file was deleted.

46 changes: 0 additions & 46 deletions flex/engines/graph_db/app/adhoc_app.h

This file was deleted.

12 changes: 6 additions & 6 deletions flex/engines/graph_db/app/cypher_read_app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ namespace gs {

bool CypherReadApp::Query(const GraphDBSession& graph, Decoder& input,
Encoder& output) {
auto txn = graph.GetReadTransaction();
std::string_view _bytes = input.get_bytes();
uint8_t type = static_cast<uint8_t>(_bytes.back());
std::string_view bytes = std::string_view(_bytes.data(), _bytes.size() - 1);
std::string_view r_bytes = input.get_bytes();
uint8_t type = static_cast<uint8_t>(r_bytes.back());
std::string_view bytes = std::string_view(r_bytes.data(), r_bytes.size() - 1);
if (type == Schema::ADHOC_READ_PLUGIN_ID) {
auto txn = graph.GetReadTransaction();

physical::PhysicalPlan plan;
if (!plan.ParseFromString(std::string(bytes))) {
LOG(ERROR) << "Parse plan failed...";
return false;
}

LOG(INFO) << "plan: " << plan.DebugString();
auto txn = graph.GetReadTransaction();

gs::runtime::GraphReadInterface gri(txn);
auto ctx = runtime::PlanParser::get()
.parse_read_pipeline(graph.schema(),
Expand Down Expand Up @@ -69,6 +68,7 @@ bool CypherReadApp::Query(const GraphDBSession& graph, Decoder& input,
query, runtime::PlanParser::get().parse_read_pipeline(
db_.schema(), gs::runtime::ContextMeta(), plan));
}
auto txn = graph.GetReadTransaction();

gs::runtime::GraphReadInterface gri(txn);
auto ctx = pipeline_cache_.at(query).Execute(gri, runtime::Context(),
Expand Down
1 change: 0 additions & 1 deletion flex/engines/graph_db/database/graph_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/

#include "flex/engines/graph_db/database/graph_db.h"
#include "flex/engines/graph_db/app/adhoc_app.h"
#include "flex/engines/graph_db/app/builtin/count_vertices.h"
#include "flex/engines/graph_db/app/builtin/k_hop_neighbors.h"
#include "flex/engines/graph_db/app/builtin/pagerank.h"
Expand Down

0 comments on commit 297fce5

Please sign in to comment.