cwida/duckpgq-extension
cwida/duckpgq-extension has 515 GitHub stars and 41 forks. GitHot measured 0 stars in 24 hours and +2 in 7 days. Last checked 2026-11-12 19:54 UTC. Last push 2026-11-04.
DuckDB extension that adds support for SQL/PGQ and graph algorithms
实测星标增长
- 24小时
- 0
- 7天
- +2
- 15天
- 更新延迟
- 1个月
- 更新延迟
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文DuckPGQ
DuckPGQ is a DuckDB extension for graph workloads with support for SQL/PGQ.
For user documentation, examples, and background, see duckpgq.org.
Status
DuckPGQ is a research project and a work in progress. Feedback, bug reports, and contributions are welcome.
The SQL/PGQ syntax (CREATE, DROP, DESCRIBE and SUMMARIZE PROPERTY GRAPH, and GRAPH_TABLE queries) is
provided through DuckDB's composable GrammarExtension API, so DuckPGQ needs no patched or vendored parser.
See the grammar notes for activation, supported syntax, and how the grammar is wired in.
Installation
DuckPGQ is available as a DuckDB community extension:
INSTALL duckpgq FROM community;
LOAD duckpgq;
See the DuckPGQ community extension page for package availability.
Quick Example
SET active_grammar_extensions = ['duckpgq'];
CREATE TABLE Person(id BIGINT, name VARCHAR);
CREATE TABLE Person_knows_Person(person1id BIGINT, person2id BIGINT);
INSERT INTO Person VALUES
(1, 'Alice'),
(2, 'Bob');
INSERT INTO Person_knows_Person VALUES
(1, 2);
CREATE PROPERTY GRAPH social
VERTEX TABLES (
Person
)
EDGE TABLES (
Person_knows_Person
SOURCE KEY (person1id) REFERENCES Person (id)
DESTINATION KEY (person2id) REFERENCES Person (id)
LABEL Knows
);
SELECT *
FROM GRAPH_TABLE (snb
MATCH (a:Person)-[k:Knows]->(b:Person)
COLUMNS (a.id AS person, b.id AS friend)
);
Building From Source
Initialize submodules before building:
git submodule update --init --recursive
Build the extension and the bundled DuckDB shell:
make release GEN=ninja
For a debug build:
make debug GEN=ninja
Build artifacts are written under build/<build-type>/:
| Artifact | Release path | Debug path |
|---|---|---|
| DuckDB shell | build/release/duckdb |
build/debug/duckdb |
| Test runner | build/release/test/unittest |
build/debug/test/unittest |
| Loadable extension | build/release/extension/duckpgq/duckpgq.duckdb_extension |
build/debug/extension/duckpgq/duckpgq.duckdb_extension |
DuckPGQ uses the DuckDB extension build system. If dependency resolution fails, install and configure vcpkg, then set VCPKG_TOOLCHAIN_PATH to your vcpkg toolchain file.
Running a Local Build
Start the locally built DuckDB shell:
./build/release/duckdb
The extension is linked into this shell.
Enable the SQL/PGQ grammar on each connection with SET active_grammar_extensions = ['duckpgq'];.
Testing
Run the SQL test suite:
make test_release
Every test activates the grammar explicitly, including on each named connection it uses. The focused grammar
tests live under test/sql/grammar_extension/.
Run a single SQL logic test:
make test T=test/sql/pattern_matching/undirected_edges.test
Run clang-tidy checks:
make tidy-check
Repository Notes
- SQL tests live in
test/sql. - Extension source lives in
src. - Grammar integration lives under
src/core/parserand extends DuckDB's native grammar without a vendored parser. - Maintenance notes for updating DuckDB or parser dependencies are in docs/UPDATING.md.
- Aggregates over n:m joins are rewritten into factorized form by an optimizer extension, see
docs/FACTORIZED_JOINS.md. Disable it with
SET duckpgq_factorized_joins = false;, or only itsFACTORIZED_GROUP_JOINoperator withSET duckpgq_factorized_join_operator = false;, or the operator's dense-array counting withSET duckpgq_factorized_join_directory = false;. CREATE PROPERTY GRAPHverifies that every edge key references an existing vertex row and fails with an "Incomplete edge" error otherwise (rows modified afterwards are not re-checked). This lets theMATCHtranslation leave out vertex tables that a query only uses for their unique key, joining the incident edge tables to each other instead (VertexEliminationPlannerinsrc/core/functions/table/match.cpp). Disable the rewrite withSET duckpgq_vertex_join_elimination = false;.
探索相关项目
Asabeneh/30-Days-Of-Python
30 Days of Python 编程挑战是一份循序渐进的指南,用于在 30 天内学习 Python 编程语言。这项挑战可能需要超过 100 天。请按自己的节奏进行。这些视频或许也有帮助:https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,618 星标grafana/grafana
开放且可组合的可观测性与数据可视化平台。可对来自 Prometheus、Loki、Elasticsearch、InfluxDB、Postgres 等众多数据源的指标、日志和追踪进行可视化。
77,859 星标redis/redis
对于正在构建实时数据驱动应用的开发者而言,Redis 是首选、速度最快且功能最丰富的缓存、数据结构服务器和文档与向量查询引擎。
77,472 星标apache/superset
Apache Superset 是一个数据可视化与数据探索平台
75,495 星标