diff --git a/querybook/server/lib/query_analysis/validation/decorators/base_sqlglot_validation_decorator.py b/querybook/server/lib/query_analysis/validation/decorators/base_sqlglot_validation_decorator.py index f4faadcac..1d9264ec2 100644 --- a/querybook/server/lib/query_analysis/validation/decorators/base_sqlglot_validation_decorator.py +++ b/querybook/server/lib/query_analysis/validation/decorators/base_sqlglot_validation_decorator.py @@ -49,7 +49,10 @@ def _get_query_validation_result( end_index: int, suggestion: str = None, validation_result_object_type=QueryValidationResultObjectType.LINT, + message: str = None, ): + if message is None: + message = self.message start_line, start_ch = self._get_query_coordinate_by_index(query, start_index) end_line, end_ch = self._get_query_coordinate_by_index(query, end_index) @@ -57,7 +60,7 @@ def _get_query_validation_result( start_line, start_ch, self.severity, - self.message, + message, validation_result_object_type, end_line=end_line, end_ch=end_ch, diff --git a/querybook/server/lib/query_analysis/validation/validators/presto_optimizing_validator.py b/querybook/server/lib/query_analysis/validation/validators/presto_optimizing_validator.py index 70bf71e0c..4aa012da1 100644 --- a/querybook/server/lib/query_analysis/validation/validators/presto_optimizing_validator.py +++ b/querybook/server/lib/query_analysis/validation/validators/presto_optimizing_validator.py @@ -205,10 +205,6 @@ class PrestoOptimizingValidator(BaseQueryValidator): def languages(self): return ["presto", "trino"] - @property - def tokenizer(self) -> Tokenizer: - return Trino.Tokenizer() - def _get_explain_validator(self): return PrestoExplainValidator("")