betodealmeida commented on code in PR #33515: URL: https://github.com/apache/superset/pull/33515#discussion_r2103579955
########## superset/sql/parse.py: ########## @@ -459,12 +467,11 @@ def optimize(self) -> SQLStatement: """ # only optimize statements that have a custom dialect if not self._dialect: - return SQLStatement(self._sql, self.engine, self._parsed.copy()) + return SQLStatement(ast=self._parsed.copy(), engine=self.engine) optimized = pushdown_predicates(self._parsed, dialect=self._dialect) - sql = optimized.sql(dialect=self._dialect) Review Comment: Yeah, this is redundant. Before, to create a new statement we had to pass the SQL (a string) and the AST, so here we were generating the SQL. Now we just pass the AST directly. -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org