Files
superset2/superset/sql
Claude c5fc31a67f fix(db2): explicitly register DB2Interval in TRANSFORMS for sqlglot 30
sqlglot 30 changed how the generator dispatch is built. In 28 the
auto-discovery walked all expression subclasses; in 30 it only
considers classes registered in sqlglot.expressions.EXPR_CLASSES,
which is populated once at module load via subclasses(__name__, Expr)
— i.e. ONLY built-in expression types. Custom user-defined
Expression subclasses defined outside that module — like our
DB2Interval — no longer get auto-wired to their <name>_sql handler.

Adding DB2Interval to TRANSFORMS as a lambda → db2interval_sql
restores the dispatch. All 24 dialects/db2_tests.py tests pass.
2026-05-20 17:45:55 -07:00
..