AmoghAtreya commented on code in PR #44968:
URL: https://github.com/apache/superset/pull/44968#discussion_r4179508431
##########
superset/commands/sql_lab/estimate.py:
##########
@@ -91,7 +92,7 @@ def validate(self) -> None:
catalog=self._catalog,
schema=self._schema or None,
template_params=self._template_params,
- force_dataset_match=True,
+ force_dataset_match=requires_dataset_match(),
Review Comment:
Fixed. `validate()` still authorizes the Jinja source before rendering, and
`run()` now authorizes the rendered SQL again before the cost estimate. The
second check parses that literal statement, so a template that renders to a
different table cannot be estimated against a table the first check never saw.
If the second check fails, the database is not queried.
--
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]