SIGN IN SIGN UP
apache / superset UNCLAIMED

Apache Superset is a Data Visualization and Data Exploration Platform

0 0 147 TypeScript

fix(sqlglot30): adapt VERSION() detection and DremioRegexpSplit to sqlglot 30 API

In sqlglot 30, VERSION() in the Postgres dialect is normalised to a
CurrentVersion node (sql_name = CURRENT_VERSION) instead of an
Anonymous node, so check_functions_present no longer matched 'version'.
Fix by reverse-looking up the dialect parser's FUNCTIONS dict to include
all SQL-level aliases (e.g. 'VERSION') for each Func class found in the
AST.

Also, sqlglot 30 reorganised its expression hierarchy: Func now inherits
from Condition -> Expr rather than Expression, and the concrete
_set_parent implementation lives only on Expression.  Custom Func
subclasses must therefore also inherit from exp.Expression.
DremioRegexpSplit is updated accordingly.

Co-Authored-By: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
C
Claude committed
8949220992cbab5a1143e1cf8319571d8b366754
Parent: c5fc31a