diff --git a/duckdb-pgq b/duckdb-pgq index 9ba3eaf6..e989160f 160000 --- a/duckdb-pgq +++ b/duckdb-pgq @@ -1 +1 @@ -Subproject commit 9ba3eaf683d783cf5feb3b208eff6e0e53adcc50 +Subproject commit e989160f8384c3418be3058eaae2eab6cb121457 diff --git a/src/common.cpp b/src/common.cpp index 2e0a516f..305206e3 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -2,7 +2,7 @@ #include "duckdb/execution/expression_executor.hpp" #include "duckdb/main/client_data.hpp" -#include "duckdb/common/compressed_sparse_row.hpp" +#include "duckpgq/compressed_sparse_row.hpp" #include #include "duckpgq_extension.hpp" diff --git a/src/functions/scalar/csr_creation.cpp b/src/functions/scalar/csr_creation.cpp index 14f954ef..96539339 100644 --- a/src/functions/scalar/csr_creation.cpp +++ b/src/functions/scalar/csr_creation.cpp @@ -3,7 +3,7 @@ #include "duckdb/planner/expression/bound_function_expression.hpp" #include "duckpgq/common.hpp" #include "duckpgq/duckpgq_functions.hpp" -#include "duckdb/common/compressed_sparse_row.hpp" +#include "duckpgq/compressed_sparse_row.hpp" #include #include diff --git a/src/functions/tablefunctions/pgq_scan.cpp b/src/functions/tablefunctions/pgq_scan.cpp index ba646aac..3b1aad87 100644 --- a/src/functions/tablefunctions/pgq_scan.cpp +++ b/src/functions/tablefunctions/pgq_scan.cpp @@ -2,7 +2,7 @@ #include "duckpgq/functions/tablefunctions/pgq_scan.hpp" #include "duckpgq/common.hpp" #include "duckpgq/duckpgq_functions.hpp" -#include "duckdb/common/compressed_sparse_row.hpp" +#include "duckpgq/compressed_sparse_row.hpp" #include "duckdb/parser/parsed_data/create_table_function_info.hpp" #include "duckdb/function/table_function.hpp" #include "duckdb/parser/parsed_data/create_property_graph_info.hpp" diff --git a/src/include/duckpgq/common.hpp b/src/include/duckpgq/common.hpp index 8cedd302..7f3fb82d 100644 --- a/src/include/duckpgq/common.hpp +++ b/src/include/duckpgq/common.hpp @@ -15,7 +15,7 @@ #include "duckdb/execution/expression_executor.hpp" #include "duckdb/main/client_context.hpp" #include "duckdb/planner/expression/bound_function_expression.hpp" -#include "duckdb/common/compressed_sparse_row.hpp" +#include "duckpgq/compressed_sparse_row.hpp" #include "duckdb/parser/parsed_data/create_property_graph_info.hpp" namespace duckdb { diff --git a/src/include/duckpgq/compressed_sparse_row.hpp b/src/include/duckpgq/compressed_sparse_row.hpp new file mode 100644 index 00000000..a9a442da --- /dev/null +++ b/src/include/duckpgq/compressed_sparse_row.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include "duckdb/common/atomic.hpp" +#include "duckdb/execution/executor.hpp" + +namespace duckdb { +class CSR { +public: + CSR() { + } + ~CSR() { + delete[] v; + } + + atomic *v; + + vector e; + vector edge_ids; + + vector w; + vector w_double; + + bool initialized_v = false; + bool initialized_e = false; + bool initialized_w = false; + + size_t vsize; +}; +} // namespace duckdb diff --git a/src/include/duckpgq/functions/tablefunctions/pgq_scan.hpp b/src/include/duckpgq/functions/tablefunctions/pgq_scan.hpp index 89f2a2ee..990b009b 100644 --- a/src/include/duckpgq/functions/tablefunctions/pgq_scan.hpp +++ b/src/include/duckpgq/functions/tablefunctions/pgq_scan.hpp @@ -6,7 +6,7 @@ */ #include "duckdb/function/table_function.hpp" -#include "duckdb/common/compressed_sparse_row.hpp" +#include "duckpgq/compressed_sparse_row.hpp" #include "duckpgq/common.hpp" #include "duckpgq/duckpgq_functions.hpp" #include "duckdb/common/types/value.hpp" diff --git a/src/include/duckpgq_extension.hpp b/src/include/duckpgq_extension.hpp index 5bbe091d..deee311a 100644 --- a/src/include/duckpgq_extension.hpp +++ b/src/include/duckpgq_extension.hpp @@ -6,7 +6,7 @@ #include "duckdb/parser/query_node.hpp" #include "duckdb/parser/column_list.hpp" #include "duckdb/parser/simplified_token.hpp" -#include "duckdb/common/compressed_sparse_row.hpp" +#include "duckpgq/compressed_sparse_row.hpp" #include "duckdb/parser/parsed_data/create_property_graph_info.hpp" namespace duckdb {