fix(pinot): SUBSTR function (#35427)

This commit is contained in:
Beto Dealmeida
2025-10-02 10:29:18 -04:00
committed by GitHub
parent f3349388d0
commit 30021f8ede
2 changed files with 28 additions and 0 deletions

View File

@@ -108,6 +108,12 @@ class Pinot(MySQL):
e.args.get("expression"),
e.this,
),
exp.Substring: lambda self, e: self.func(
"SUBSTR",
e.this,
e.args.get("start"),
e.args.get("length"),
),
}
# Remove DATE_TRUNC transformation - Pinot supports standard SQL DATE_TRUNC
TRANSFORMS.pop(exp.DateTrunc, None)