mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix: adds the ability to disallow SQL functions per engine (#28639)
This commit is contained in:
committed by
GitHub
parent
6575cacc5d
commit
5dfbab5424
@@ -358,6 +358,21 @@ class OAuth2Error(SupersetErrorException):
|
||||
)
|
||||
|
||||
|
||||
class DisallowedSQLFunction(SupersetErrorException):
|
||||
"""
|
||||
Disallowed function found on SQL statement
|
||||
"""
|
||||
|
||||
def __init__(self, functions: set[str]):
|
||||
super().__init__(
|
||||
SupersetError(
|
||||
message=f"SQL statement contains disallowed function(s): {functions}",
|
||||
error_type=SupersetErrorType.SYNTAX_ERROR,
|
||||
level=ErrorLevel.ERROR,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class CreateKeyValueDistributedLockFailedException(Exception):
|
||||
"""
|
||||
Exception to signalize failure to acquire lock.
|
||||
|
||||
Reference in New Issue
Block a user