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
9 changes: 6 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ tests, and this `CLAUDE.md` live in this repo's tree.
### Core Components

1. **Protocol layer** (`src/mountainash_data/core/protocol.py`)
- `Backend` protocol — what every backend must implement (`connect()`)
- `Connection` protocol — what every connection must implement (`list_tables()`, `inspect_table()`, `to_relation()`, `close()`)
- `Backend` protocol — the single handle every backend must implement: `connect()`/`close()`/context-manager lifecycle, `list_tables()`/`list_namespaces()`/`list_catalogs()`, and `inspect_table()`/`inspect_namespace()`/`inspect_catalog()`
- There is deliberately no `to_relation()` on the protocol — bridging to the unified `mountainash` package is pull-side: `table()` returns a backend-native ibis Table and `ma.relation(ibis_table)` compiles against it directly

2. **Inspection model** (`src/mountainash_data/core/inspection.py`)
- `CatalogInfo`, `NamespaceInfo`, `TableInfo`, `ColumnInfo` — shared physical metadata dataclasses
Expand Down Expand Up @@ -244,7 +244,10 @@ conn = backend.connect()
try:
tables = conn.list_tables()
info = conn.inspect_table("users")
relation = conn.to_relation("users") # → mountainash-expressions Relation
ibis_table = conn.table("users") # backend-native ibis Table
# Bridge to the unified mountainash package (pull-side):
# import mountainash as ma
# rel = ma.relation(ibis_table) # compiles against Ibis automatically
finally:
conn.close()

Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ conn = backend.connect()
try:
tables = conn.list_tables()
info = conn.inspect_table("my_table")
relation = conn.to_relation("my_table") # → mountainash-expressions Relation
ibis_table = conn.table("my_table") # backend-native ibis Table
# Bridge to the unified mountainash package (pull-side):
# import mountainash as ma
# rel = ma.relation(ibis_table) # compiles against Ibis automatically
finally:
conn.close()

Expand Down Expand Up @@ -129,7 +132,7 @@ from mountainash_data import (

- **12-dialect ibis registry** — SQLite, DuckDB, MotherDuck, PostgreSQL, MySQL, MSSQL, Oracle, Snowflake, BigQuery, Redshift, Trino, PySpark
- **Protocol-first design** — `Backend` and `Connection` protocols enable type-safe composition
- **Expressions seam** — `Connection.to_relation()` bridges to `mountainash-expressions`
- **mountainash seam (pull-side)** — `table()` returns a backend-native ibis Table; `ma.relation(table)` in the unified `mountainash` package compiles against it directly. There is deliberately no push-side `to_relation()` bridge in this package.
- **Settings-driven** — pydantic settings for every dialect, factory auto-detection from URLs
- **Comprehensive test suite** ensuring reliability

Expand Down
8 changes: 5 additions & 3 deletions src/mountainash_data/backends/iceberg/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
- Schema caching
- Thin delegation wrappers to ``operations.py`` for all mutations

``to_relation()`` is intentionally NOT implemented — it requires
mountainash-expressions to gain an Iceberg adapter, which is a separate
work item tracked in the spec.
There is deliberately no ``to_relation()`` here (or anywhere in this
package): bridging to the unified ``mountainash`` package is pull-side —
``ma.relation(...)`` over a backend-native handle. For Iceberg that handle
is not an ibis Table; reaching mountainash goes via an Arrow scan of the
loaded ``table()``, or via an Ibis engine reading the catalog.
"""

from __future__ import annotations
Expand Down
27 changes: 0 additions & 27 deletions tests/test_unit/backends/ibis/COVERAGE_GAP.md

This file was deleted.

Loading