mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(pinot): DATE_ADD function (#35424)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user