A small Python package providing a custom SQLGlot transformation that rewrites the PostgreSQL-style AGE() function into an equivalent Spark SQL expression.
The project includes:
- An SQLGlot transformation implementation in
src/sqlglot_age_transform/transform.py - Basic tests under
tests/
This project uses uv, a modern Python package manager and workflow tool. How to install uv?
Requires Python 3.12+.
- Fork this repository, then clone the fork
git clone https://github.com/your-username/sqlglot-age-transform
cd sqlglot-age-transform- Install all dependencies
uv sync --all-extras- Activate pre-commit hooks
uv run pre-commit installCheck (lint only):
uv run ruff checkAuto-fix lint issues where supported:
uv run ruff check --fixFormat code:
uv run ruff formatRun tests:
uv run pytest