Skip to content

Commit 297fce5

Browse files
committed
delete adhoc app
1 parent bec7146 commit 297fce5

File tree

5 files changed

+6
-105
lines changed

5 files changed

+6
-105
lines changed

flex/engines/graph_db/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,5 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/app/app_base.h
2828
DESTINATION include/flex/engines/graph_db/app)
2929
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/app/hqps_app.h
3030
DESTINATION include/flex/engines/graph_db/app)
31-
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/app/adhoc_app.h
32-
DESTINATION include/flex/engines/graph_db/app)
3331

3432

flex/engines/graph_db/app/adhoc_app.cc

Lines changed: 0 additions & 50 deletions
This file was deleted.

flex/engines/graph_db/app/adhoc_app.h

Lines changed: 0 additions & 46 deletions
This file was deleted.

flex/engines/graph_db/app/cypher_read_app.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,19 @@ namespace gs {
99

1010
bool CypherReadApp::Query(const GraphDBSession& graph, Decoder& input,
1111
Encoder& output) {
12-
auto txn = graph.GetReadTransaction();
13-
std::string_view _bytes = input.get_bytes();
14-
uint8_t type = static_cast<uint8_t>(_bytes.back());
15-
std::string_view bytes = std::string_view(_bytes.data(), _bytes.size() - 1);
12+
std::string_view r_bytes = input.get_bytes();
13+
uint8_t type = static_cast<uint8_t>(r_bytes.back());
14+
std::string_view bytes = std::string_view(r_bytes.data(), r_bytes.size() - 1);
1615
if (type == Schema::ADHOC_READ_PLUGIN_ID) {
17-
auto txn = graph.GetReadTransaction();
18-
1916
physical::PhysicalPlan plan;
2017
if (!plan.ParseFromString(std::string(bytes))) {
2118
LOG(ERROR) << "Parse plan failed...";
2219
return false;
2320
}
2421

2522
LOG(INFO) << "plan: " << plan.DebugString();
23+
auto txn = graph.GetReadTransaction();
24+
2625
gs::runtime::GraphReadInterface gri(txn);
2726
auto ctx = runtime::PlanParser::get()
2827
.parse_read_pipeline(graph.schema(),
@@ -69,6 +68,7 @@ bool CypherReadApp::Query(const GraphDBSession& graph, Decoder& input,
6968
query, runtime::PlanParser::get().parse_read_pipeline(
7069
db_.schema(), gs::runtime::ContextMeta(), plan));
7170
}
71+
auto txn = graph.GetReadTransaction();
7272

7373
gs::runtime::GraphReadInterface gri(txn);
7474
auto ctx = pipeline_cache_.at(query).Execute(gri, runtime::Context(),

flex/engines/graph_db/database/graph_db.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
*/
1515

1616
#include "flex/engines/graph_db/database/graph_db.h"
17-
#include "flex/engines/graph_db/app/adhoc_app.h"
1817
#include "flex/engines/graph_db/app/builtin/count_vertices.h"
1918
#include "flex/engines/graph_db/app/builtin/k_hop_neighbors.h"
2019
#include "flex/engines/graph_db/app/builtin/pagerank.h"

0 commit comments

Comments
 (0)