robdiciuccio commented on a change in pull request #8769: Limit payload
returned when using SQLLAB_BACKEND_PERSISTENCE
URL:
https://github.com/apache/incubator-superset/pull/8769#discussion_r384774308
##########
File path: superset/views/core.py
##########
@@ -3093,26 +3092,38 @@ def sqllab(self):
}
for database in db.session.query(models.Database).all()
}
+ # return all user queries associated with existing SQL editors
user_queries = (
-
db.session.query(Query).filter_by(user_id=g.user.get_id()).all()
+ db.session.query(Query)
+ .filter_by(user_id=user_id)
+ .filter(Query.sql_editor_id.cast(Integer).in_(tab_state_ids))
Review comment:
@betodealmeida we're seeing the following error due to the casting as an
Integer:
```
sqlalchemy.exc.DataError: (psycopg2.DataError) invalid input syntax for
integer: "dKvEsdZdq"
```
Any reason why `tab_state.id` should not be a `varchar` to match
`query.sql_editor_id`?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]