Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 9 additions & 9 deletions bin/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "neug/execution/common/context.h"
#include "neug/execution/common/operators/retrieve/sink.h"
#include "neug/execution/common/types/value.h"
#include "neug/common/types/value.h"
#include "neug/execution/execute/plan_parser.h"
#include "neug/main/neug_db.h"
#include "neug/main/query_request.h"
Expand Down Expand Up @@ -54,40 +54,40 @@ neug::execution::ParamsMap deserialize_string_kv_map(
switch (type.id()) {
case neug::DataTypeId::kInt32: {
map.emplace(iter.first,
neug::execution::Value::INT32(std::stoi(iter.second)));
neug::Value::INT32(std::stoi(iter.second)));
break;
}
case neug::DataTypeId::kInt64: {
map.emplace(iter.first,
neug::execution::Value::INT64(std::stoll(iter.second)));
neug::Value::INT64(std::stoll(iter.second)));
break;
}
case neug::DataTypeId::kUInt32: {
map.emplace(iter.first,
neug::execution::Value::UINT32(std::stoul(iter.second)));
neug::Value::UINT32(std::stoul(iter.second)));
break;
}
case neug::DataTypeId::kUInt64: {
map.emplace(iter.first,
neug::execution::Value::UINT64(std::stoull(iter.second)));
neug::Value::UINT64(std::stoull(iter.second)));
break;
}
case neug::DataTypeId::kBoolean: {
map.emplace(iter.first,
neug::execution::Value::BOOLEAN(iter.second == "true"));
neug::Value::BOOLEAN(iter.second == "true"));
break;
}
case neug::DataTypeId::kVarchar: {
map.emplace(iter.first, neug::execution::Value::STRING(iter.second));
map.emplace(iter.first, neug::Value::STRING(iter.second));
break;
}
case neug::DataTypeId::kTimestampMs: {
map.emplace(iter.first, neug::execution::Value::TIMESTAMPMS(
map.emplace(iter.first, neug::Value::TIMESTAMPMS(
neug::DateTime(std::stoll(iter.second))));
break;
}
case neug::DataTypeId::kDate: {
map.emplace(iter.first, neug::execution::Value::DATE(neug::Date(
map.emplace(iter.first, neug::Value::DATE(neug::Date(
int64_t(std::stoll(iter.second)))));
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions doc/source/_scripts/generate_cpp_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1507,8 +1507,8 @@ def _generate_category_index_md(self, categories: Dict[str, Any]):
```cpp
// Safe parameter passing prevents injection
neug::execution::ParamsMap params;
params["min_age"] = neug::execution::Value(25);
params["city"] = neug::execution::Value("Beijing");
params["min_age"] = neug::Value(25);
params["city"] = neug::Value("Beijing");

auto result = conn->Query(
"MATCH (p:Person) WHERE p.age > $min_age AND p.city = $city RETURN p",
Expand Down
2 changes: 1 addition & 1 deletion doc/source/reference/cpp_api/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Compiles and executes a Cypher query string against the database. The query is p
auto result = conn->Query("MATCH (n:Person) RETURN n.name", "read");
// Query with parameters
neug::execution::ParamsMap params;
params["min_age"] = neug::execution::Value(18);
params["min_age"] = neug::Value(18);
result = conn->Query("MATCH (p:Person) WHERE p.age > $min_age RETURN p",
"read", params);
// Process results
Expand Down
4 changes: 2 additions & 2 deletions extension/gds/include/bfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ namespace neug {
namespace gds {
struct NEUG_API BFSFunction {
static constexpr const char* name = "bfs";
static neug::execution::Context exec(const function::CallFuncInputBase& input,
neug::IStorageInterface& graph);
static execution::Context exec(const function::CallFuncInputBase& input,
IStorageInterface& graph);

static std::unique_ptr<function::CallFuncInputBase> bind(
const Schema& schema, const execution::ContextMeta& ctx_meta,
Expand Down
4 changes: 2 additions & 2 deletions extension/gds/include/cdlp.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ struct NEUG_API CDLPFunction {
static std::unique_ptr<function::CallFuncInputBase> bind(
const Schema& schema, const execution::ContextMeta& ctx_meta,
const ::physical::PhysicalPlan& plan, int op_idx);
static neug::execution::Context exec(const function::CallFuncInputBase& input,
neug::IStorageInterface& graph);
static execution::Context exec(const function::CallFuncInputBase& input,
IStorageInterface& graph);

static function::function_set getFunctionSet();
};
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/bfs_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <memory>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/storages/graph/graph_interface.h"
namespace neug {
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/bfs_pred_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cstdint>
#include <memory>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/execution/expression/expr.h"
#include "neug/storages/graph/graph_interface.h"
Expand Down
8 changes: 4 additions & 4 deletions extension/gds/include/impl/cdlp_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#include <cstdint>
#include <vector>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/common/types/graph_types.h"
#include "neug/execution/common/context.h"
#include "neug/execution/expression/expr.h"
#include "neug/execution/expression/predicates.h"
Expand All @@ -31,8 +32,7 @@ namespace gds {
class CDLP {
public:
CDLP(const StorageReadInterface& graph, label_t vertex_label,
const execution::LabelTriplet& edge_triplet, int max_iterations,
int concurrency);
const LabelTriplet& edge_triplet, int max_iterations, int concurrency);

void compute();
void sink(execution::Context& ctx, int32_t node_alias, int32_t label_alias);
Expand All @@ -49,7 +49,7 @@ class CDLP {

const StorageReadInterface& graph_;
label_t vertex_label_;
execution::LabelTriplet edge_triplet_;
LabelTriplet edge_triplet_;
int max_iterations_;
int concurrency_;

Expand Down
7 changes: 4 additions & 3 deletions extension/gds/include/impl/cdlp_pred_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#include <cstdint>
#include <memory>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/common/types/graph_types.h"
#include "neug/execution/common/context.h"
#include "neug/execution/expression/expr.h"
#include "neug/storages/graph/graph_interface.h"
Expand All @@ -36,7 +37,7 @@ namespace gds {
class CDLPPred {
public:
CDLPPred(const StorageReadInterface& graph, label_t vertex_label,
const execution::LabelTriplet& edge_triplet, int max_iterations,
const LabelTriplet& edge_triplet, int max_iterations,
int concurrency, execution::ExprBase* vertex_pred,
execution::ExprBase* edge_pred);

Expand All @@ -46,7 +47,7 @@ class CDLPPred {
private:
const StorageReadInterface& graph_;
label_t vertex_label_;
execution::LabelTriplet edge_triplet_;
LabelTriplet edge_triplet_;
int max_iterations_;
int concurrency_;
execution::ExprBase* vertex_pred_;
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/kcore_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <memory>
#include <vector>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/storages/graph/graph_interface.h"

Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/kcore_pred_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cstdint>
#include <vector>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/execution/expression/expr.h"
#include "neug/storages/graph/graph_interface.h"
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/lcc_directed_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cstdint>
#include <vector>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/storages/graph/graph_interface.h"

Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/lcc_pred_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cstdint>
#include <memory>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/execution/expression/expr.h"
#include "neug/storages/graph/graph_interface.h"
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/lcc_undirected_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <memory>
#include <vector>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/storages/graph/graph_interface.h"

Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/page_rank_directed_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <memory>
#include <vector>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/expression/expr.h"

namespace neug {
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/page_rank_pred_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cstdint>
#include <memory>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/execution/expression/expr.h"
#include "neug/storages/graph/graph_interface.h"
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/page_rank_undirected_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <memory>
#include <vector>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/expression/expr.h"

namespace neug {
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/sssp_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <string>
#include <vector>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/storages/graph/graph_interface.h"

Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/sssp_pred_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <memory>
#include <string>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/execution/expression/expr.h"
#include "neug/storages/graph/graph_interface.h"
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/wcc_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <atomic>
#include <memory>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/storages/graph/graph_interface.h"

Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/impl/wcc_pred_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cstdint>
#include <memory>

#include "neug/execution/common/columns/container_types.h"
#include "neug/common/types/container_types.h"
#include "neug/execution/common/context.h"
#include "neug/execution/expression/expr.h"
#include "neug/storages/graph/graph_interface.h"
Expand Down
4 changes: 2 additions & 2 deletions extension/gds/include/kcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ namespace neug {
namespace gds {
struct NEUG_API KCoreFunction {
static constexpr const char* name = "kcore";
static neug::execution::Context exec(const function::CallFuncInputBase& input,
neug::IStorageInterface& graph);
static execution::Context exec(const function::CallFuncInputBase& input,
IStorageInterface& graph);

static std::unique_ptr<function::CallFuncInputBase> bind(
const Schema& schema, const execution::ContextMeta& ctx_meta,
Expand Down
4 changes: 2 additions & 2 deletions extension/gds/include/lcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ namespace neug {
namespace gds {
struct NEUG_API LCCFunction {
static constexpr const char* name = "lcc";
static neug::execution::Context exec(const function::CallFuncInputBase& input,
neug::IStorageInterface& graph);
static execution::Context exec(const function::CallFuncInputBase& input,
IStorageInterface& graph);

static std::unique_ptr<function::CallFuncInputBase> bind(
const Schema& schema, const execution::ContextMeta& ctx_meta,
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/leiden.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct NEUG_API LeidenFunction {
const ::physical::PhysicalPlan& plan, int op_idx);

static execution::Context exec(const function::CallFuncInputBase& input_base,
neug::IStorageInterface& g);
IStorageInterface& g);

static function::function_set getFunctionSet();
};
Expand Down
2 changes: 1 addition & 1 deletion extension/gds/include/louvain.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct NEUG_API LouvainFunction {
const ::physical::PhysicalPlan& plan, int op_idx);

static execution::Context exec(const function::CallFuncInputBase& input_base,
neug::IStorageInterface& g);
IStorageInterface& g);

static function::function_set getFunctionSet();
};
Expand Down
4 changes: 2 additions & 2 deletions extension/gds/include/page_rank.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ namespace neug {
namespace gds {
struct NEUG_API PageRankFunction {
static constexpr const char* name = "page_rank";
static neug::execution::Context exec(const function::CallFuncInputBase& input,
neug::IStorageInterface& graph);
static execution::Context exec(const function::CallFuncInputBase& input,
IStorageInterface& graph);

static std::unique_ptr<function::CallFuncInputBase> bind(
const Schema& schema, const execution::ContextMeta& ctx_meta,
Expand Down
4 changes: 2 additions & 2 deletions extension/gds/include/sssp.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ namespace neug {
namespace gds {
struct NEUG_API SSSPFunction {
static constexpr const char* name = "sssp";
static neug::execution::Context exec(const function::CallFuncInputBase& input,
neug::IStorageInterface& graph);
static execution::Context exec(const function::CallFuncInputBase& input,
IStorageInterface& graph);

static std::unique_ptr<function::CallFuncInputBase> bind(
const Schema& schema, const execution::ContextMeta& ctx_meta,
Expand Down
Loading
Loading