fix(pinot): DATE_ADD function (#35424)

This commit is contained in:
Beto Dealmeida
2025-10-02 09:56:20 -04:00
committed by GitHub
parent 5493e2c96d
commit 5428376662
3 changed files with 76 additions and 9 deletions

View File

@@ -552,14 +552,16 @@ class SQLStatement(BaseSQLStatement[exp.Expression]):
try:
statements = sqlglot.parse(script, dialect=dialect)
except sqlglot.errors.ParseError as ex:
error = ex.errors[0]
raise SupersetParseError(
script,
engine,
highlight=error["highlight"],
line=error["line"],
column=error["col"],
) from ex
kwargs = (
{
"highlight": ex.errors[0]["highlight"],
"line": ex.errors[0]["line"],
"column": ex.errors[0]["col"],
}
if ex.errors
else {}
)
raise SupersetParseError(script, engine, **kwargs) from ex
except sqlglot.errors.SqlglotError as ex:
raise SupersetParseError(
script,