Skip to content

Commit

Permalink
Move compressed_sparse_row.hpp to extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtenwolde committed Mar 26, 2024
1 parent b99e0d7 commit ec96039
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion duckdb-pgq
2 changes: 1 addition & 1 deletion src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <utility>
#include "duckpgq_extension.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/functions/scalar/csr_creation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cmath>
#include <mutex>
Expand Down
2 changes: 1 addition & 1 deletion src/functions/tablefunctions/pgq_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/include/duckpgq/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
29 changes: 29 additions & 0 deletions src/include/duckpgq/compressed_sparse_row.hpp
Original file line number Diff line number Diff line change
@@ -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<int64_t> *v;

vector<int64_t> e;
vector<int64_t> edge_ids;

vector<int64_t> w;
vector<double> w_double;

bool initialized_v = false;
bool initialized_e = false;
bool initialized_w = false;

size_t vsize;
};
} // namespace duckdb
2 changes: 1 addition & 1 deletion src/include/duckpgq/functions/tablefunctions/pgq_scan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/include/duckpgq_extension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ec96039

Please sign in to comment.