Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.0.0] - 2026-03-29¶
Added¶
- Semantic equality comparison: All expression types now implement
__eq__and__hash__for structural equality. Comparison is order-insensitive for commutative compound expressions (AllExpr,AnyExpr,In). Enables expressions to be used in sets and as dict keys, and fixesField.__eq__so it returns aboolinstead of anEqnode when compared to another expression object.
Changed¶
- Optimizer — NOT of comparison folded to its complement (runs before De Morgan's law):
NOT(f == v)→f != vNOT(f != v)→f == vNOT(f < v)→f >= vNOT(f <= v)→f > vNOT(f > v)→f <= vNOT(f >= v)→f < vNOT(f.is_null())→f.is_not_null()NOT(f.is_not_null())→f.is_null()
Fixed¶
- Optimizer recursion: The optimizer now recurses into sub-expressions created by each rule before moving on.
[0.8.0] - 2026-03-26¶
Changed¶
AggregationCOUNT field handling: Constructing anAggregationwithAggregationFunction.COUNTand a non-Nonefield no longer raisesValueError. The field is now silently ignored and set toNone.
[0.7.0] - 2026-03-25¶
Added¶
- Field pruning and projection (
therismos.prune_fields): Remove or project field-based constraints from an expression tree in a polarity-aware manner. See Field Pruning.
[0.6.0] - 2026-03-21¶
Added¶
-
Expression Templates: Parameterized, persistable filter expressions with named placeholders and a transform pipeline DSL. See Templates.
-
Betweenexpression: A new first-class expression for half-open range checks (lower <= field < upper). Constructed viaField.between(lower, upper).
[0.5.0] - 2026-02-25¶
Added¶
- Polars backend (
therismos[polars]):PolarsExprVisitor,PolarsSortSpecVisitor,PolarsGroupSpecVisitor. - Pandas backend (
therismos[pandas]):PandasExprVisitor,PandasSortSpecVisitor,PandasGroupSpecVisitor.
[0.4.1] - 2026-01-27¶
Changed¶
- Internal Refactoring: Generic
OptimizationRecord[T], sharedkeep_last_occurrence()utility,Serializer.GRAMMARclass constant. No public API changes.
[0.4.0] - 2026-01-20¶
Added¶
- Expression Class Hierarchy: New abstract base classes:
AtomicExpr,CompositeExpr,DecoratorExpr,FieldBasedExpr,SingleValuedFieldExpr,MultiValuedFieldExpr,ComparisonExpr. - Multi-Valued Field Evaluation:
unwind_datautility and "any"/"none" semantics for list fields. - Construction-Time Validation:
SingleValuedFieldExprsubclasses raiseTypeErrorfor list/tuple/set values.
Changed¶
- BREAKING:
Serializerparameter renamedfield_types→implicit_field_types. - BREAKING:
Serializermethod renamedregister_type()→register_custom_type(). - BREAKING:
Expr.evaluate()input must now be wrapped withunwind_data. - BREAKING:
Expr.evaluate()renamed from the previousExpr.run_eval()— avoids false positives from static analyzers that flag unsafe dynamic evaluation.
[0.3.0] - 2025-11-23¶
Added¶
- Sorting Module:
SortOrder,SortCriterion,SortSpec, optimizer, visitors, MongoDB converter, serializer. - Grouping and Aggregation Module:
AggregationFunction,Aggregation,GroupSpec, optimizer, visitors, MongoDB converter, serializer.
[0.2.0] - 2025-11-23¶
Added¶
- Expression Serialization: Grammar-based
Serializerfor compact string representations. See Serialization.
[0.1.0] - 2025-11-22¶
Added¶
- Core expression AST with
Eq,Ne,Lt,Le,Gt,Ge,Regex,In,IsNull. - Compound expressions:
AllExpr,AnyExpr,NotExpr. - Optimizer with contradiction/tautology detection, De Morgan's law, and more.
- Visitor pattern with built-in
StringVisitor,DictVisitor,CountVisitor,FieldGathererVisitor. - MongoDB backend converter (
MongoVisitor).