- Preserves semantics
- Targets measurable inefficiencies
- Composes cleanly with others
How It Works
- The incoming SQL is parsed into a logical plan.
- Isofold applies rewrite rules in a deterministic order.
-
Both original and rewritten queries are dry-run for:
- Logical plan structure
- Slot usage / bytes scanned
- Compatibility with warehouse constraints
- If the rewritten query is valid and cheaper, it is executed.
- Otherwise, Isofold automatically falls back to the original.
Examples
PushDownFilter
PushDownLimit
ProjectionPrune
+ OptimizeProjections
SimplifyExpressions
EliminateDuplicatedExpr
EliminateFilter
EliminateGroupByConstant
EliminateJoin
EliminateLimit
EliminateNestedUnion
/ EliminateOneUnion
EliminateOuterJoin
ExtractEquijoinPredicate
FilterNullJoinKeys
ReplaceDistinctWithAggregate
ScalarSubqueryToJoin
SingleDistinctToGroupBy
Composed Rewrite:
PushDownFilter
SimplifyExpressions
EliminateOuterJoin
ProjectionPrune
EliminateGroupByConstant
ReplaceDistinctWithAggregate
EliminateLimit
Guarantees
- Dry-run validated for correctness
- Cost-estimated before execution
- Fallback-safe: if a rewrite introduces cost or fails validation, Isofold reverts to the original
Next: Topology Overview