willbarrett commented on a change in pull request #13150:
URL: https://github.com/apache/superset/pull/13150#discussion_r577135522
##########
File path: superset/reports/commands/alert.py
##########
@@ -117,7 +117,10 @@ def validate(self) -> None:
)
rendered_sql = sql_template.process_template(self._report_schedule.sql)
try:
- df = self._report_schedule.database.get_df(rendered_sql)
+ limited_rendered_sql =
self._report_schedule.database.apply_limit_to_sql(
+ rendered_sql, 1
Review comment:
I'm wondering if we should set the limit to 2 - the system expects a
single row and raises an error if multiple rows are returned. This error could
surface an issue with the query, or the data being accessed. Setting the limit
to 1 changes the behavior of the query in a way that could hide issues.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]