This is an automated email from the ASF dual-hosted git repository. villebro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push: new 7386b01 Cast raw 'fetch_values_predicate' to Sqlalchemy Text (#9643) 7386b01 is described below commit 7386b017ab2ee5847c5bbe2f7aa551c4f8b1a8cb Author: V <4979571+v...@users.noreply.github.com> AuthorDate: Fri Apr 24 17:04:18 2020 +0800 Cast raw 'fetch_values_predicate' to Sqlalchemy Text (#9643) Issue https://github.com/apache/incubator-superset/issues/9642 --- superset/connectors/sqla/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index 1eed4be..bb3cf59 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -601,7 +601,7 @@ class SqlaTable(Model, BaseDatasource): if self.fetch_values_predicate: tp = self.get_template_processor() - qry = qry.where(tp.process_template(self.fetch_values_predicate)) + qry = qry.where(text(tp.process_template(self.fetch_values_predicate))) engine = self.database.get_sqla_engine() sql = "{}".format(qry.compile(engine, compile_kwargs={"literal_binds": True}))