Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ jobs:
# free, but the round-trip tests need the parser.
- name: cargo test -p ogar-adapter-ttl --features ttl-parser
run: cargo test -p ogar-adapter-ttl --features ttl-parser
# Exercise the `clickhouse-parser` feature on
# ogar-adapter-clickhouse-ddl — pulls in sqlparser-rs with the
# ClickHouseDialect for CREATE TABLE parsing. Same crate-scoped
# gating pattern as the other adapter feature tests.
- name: cargo test -p ogar-adapter-clickhouse-ddl --features clickhouse-parser
run: cargo test -p ogar-adapter-clickhouse-ddl --features clickhouse-parser
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"crates/ogar-proposal",
"crates/ogar-adapter-surrealql",
"crates/ogar-adapter-ttl",
"crates/ogar-adapter-clickhouse-ddl",
"crates/ogar-knowable-from",
]

Expand Down
26 changes: 26 additions & 0 deletions crates/ogar-adapter-clickhouse-ddl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "ogar-adapter-clickhouse-ddl"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
rust-version.workspace = true
description = "Bidirectional ClickHouse DDL bridge for OGAR. emit_clickhouse_ddl(Class) renders CREATE TABLE … ENGINE = MergeTree; parse_clickhouse_ddl (behind `clickhouse-parser`) drives sqlparser with the ClickHouseDialect and walks the AST back into Vec<Class>. Companion to ogar-adapter-surrealql + ogar-adapter-ttl; per Phase 2b of docs/RDF-OWL-ALIGNMENT.md §10. Composes with bardioc PR #19's substrate-b-shadow::ClickHouseQuery — the schema this adapter models is the schema the runtime decoder reads rows against."

[features]
default = []
serde = ["dep:serde", "ogar-vocab/serde"]
# Enables ClickHouse DDL parsing via sqlparser-rs. Emit is feature-
# free; only the AST walk requires the parser dep. Mirrors the
# surrealql / ttl adapter pattern (the parser dep is the heavy
# subscriber; consumers who only need emit don't pay for it).
clickhouse-parser = ["dep:sqlparser"]

[dependencies]
ogar-vocab = { path = "../ogar-vocab" }
serde = { workspace = true, optional = true }
# sqlparser 0.59 handles ClickHouse Nullable(X) cleanly under the
# ClickHouseDialect (probed before adopting). Earlier versions
# (≤0.50) choke on Nullable in CREATE TABLE.
sqlparser = { version = "0.59", optional = true }
Loading
Loading