bito-code-review[bot] commented on code in PR #44721:
URL: https://github.com/apache/superset/pull/44721#discussion_r4139217855
##########
superset/db_engine_specs/exasol.py:
##########
@@ -27,6 +30,38 @@ class ExasolEngineSpec(BaseEngineSpec): # pylint:
disable=abstract-method
engine_name = "Exasol"
max_column_name_length = 128
+ # Keep the server's message from its keyword onwards, including the
+ # position/identifier. The passthrough placeholder has no translatable
text.
+ custom_errors: dict[Pattern[str], tuple[str, SupersetErrorType, dict[str,
Any]]] = {
+ re.compile(r"(?P<message>syntax error[^\n]*)", re.IGNORECASE): (
+ "%(message)s",
+ SupersetErrorType.SYNTAX_ERROR,
+ {},
+ ),
+ re.compile(r"(?P<message>table [^\n]* does not exist[^\n]*)",
re.IGNORECASE): (
+ "%(message)s",
+ SupersetErrorType.TABLE_DOES_NOT_EXIST_ERROR,
+ {},
+ ),
+ # Exasol reports a missing column as ``column <NAME> not found``. The
+ # keyword must start the diagnostic (not follow another word, as in
+ # ``object COLUMN not found``) and be followed by at most one
identifier.
+ re.compile(
+ r'(?P<message>(?<![\w"] )(?<![\w.$"])column'
+ r'(?: (?:"[^"\n]*"|[\w.$]+))? not found[^\n]*)',
Review Comment:
<!-- Bito Reply -->
The suggestion to change the regex backslashes is not required because the
code uses raw strings (`r'...'`), where single backslashes are interpreted
correctly as regex escape sequences. The current implementation correctly
matches the intended diagnostic patterns, and the test suite confirms that the
regex behaves as expected without modification.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]