From e31b83376e7b6ceb6f9216f56462dfca7d910219 Mon Sep 17 00:00:00 2001 From: Pingan Ren Date: Tue, 2 Apr 2024 16:13:48 +0200 Subject: [PATCH] clean code --- .../operators/physical_path_finding_operator.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/duckpgq/src/duckpgq/operators/physical_path_finding_operator.cpp b/duckpgq/src/duckpgq/operators/physical_path_finding_operator.cpp index 21a8200b..74a79b58 100644 --- a/duckpgq/src/duckpgq/operators/physical_path_finding_operator.cpp +++ b/duckpgq/src/duckpgq/operators/physical_path_finding_operator.cpp @@ -129,7 +129,6 @@ class PathFindingGlobalState : public GlobalSinkState { PathFindingGlobalState(PathFindingGlobalState &prev) : GlobalSinkState(prev), global_tasks(prev.global_tasks), - scan_state(prev.scan_state), append_state(prev.append_state), global_csr(std::move(prev.global_csr)), child(prev.child + 1) {} void Sink(DataChunk &input, PathFindingLocalState &lstate) const { @@ -329,11 +328,8 @@ PhysicalPathFinding::Finalize(Pipeline &pipeline, Event &event, while (global_tasks.Scan(scan_state, pairs)) { Vector result(LogicalType::BIGINT, true, true); IterativeLengthFunction(csr, pairs, result); - // store the result - // gstate.global_results.InitializeAppend(gstate.append_state); - // gstate.global_results.Append(gstate.append_state, pairs); - // // debug print - // gstate.global_results.Print(); + // debug print + Printer::Print(result.ToString(pairs.size())); } } @@ -381,7 +377,7 @@ class PathFindingGlobalSourceState : public GlobalSourceState { public: idx_t MaxThreads() override { - const auto &sink_state = (op.sink_state->Cast()); + // const auto &sink_state = (op.sink_state->Cast()); return 1; } @@ -411,7 +407,7 @@ PhysicalPathFinding::GetData(ExecutionContext &context, DataChunk &result, OperatorSourceInput &input) const { auto &pf_sink = sink_state->Cast(); auto &pf_gstate = input.global_state.Cast(); - auto &pf_lstate = input.local_state.Cast(); + // auto &pf_lstate = input.local_state.Cast(); pf_sink.global_tasks.Scan(pf_sink.scan_state, result); result.Print(); pf_gstate.Initialize(pf_sink);