Metadata-Version: 2.4
Name: feature-sql-tool
Version: 2.4.2
Summary: SQL feature lineage extraction and unified vector SQL planning
Author-email: Your Name <you@example.com>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: sqlglot<28,>=25
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Dynamic: license-file

# feature-sql-tool

Current implementation of `feature-sql-tool` focused on:

- recursive column resolution through CTEs and scope aliases
- computed-vs-passthrough alias classification
- intermediate feature extraction
- `filter_only_intermediate_features` classification through graph reachability
- multi-feature unified graph building
- safe SQL optimization by merging features with identical logical query shape

## Current scope

This package is a practical implementation scaffold with working core logic for:

- scope parsing
- recursive lineage for one feature
- `filter_only` classification
- safe grouping of multiple feature queries into shared aggregate CTEs when their `WITH/FROM/JOIN/WHERE/GROUP/HAVING/QUALIFY` signatures are identical

## Notes

The optimizer intentionally uses **safe reuse only**. It merges features only when their normalized query shape matches exactly.


## Optimized reusable-stage SQL builder (2.0.0)

Use `FeatureSqlTool.build_optimized_unified_sql(features)` to build unified SQL with reusable base and aggregate CTE stages when possible.
