aminghadersohi commented on PR #40346: URL: https://github.com/apache/superset/pull/40346#issuecomment-4565827331
A few schema issues worth addressing before merge: **`QueryInfo` missing `executed_sql` and `catalog`** The Query model has `executed_sql` (the actual SQL run after templating/CTAS, which differs from the user's `sql` input), `catalog`, and `user_id`. For LLM-assisted query debugging, `executed_sql` is the most valuable field — it's what actually ran. Recommend adding at minimum `executed_sql: str | None`, `catalog: str | None`, and `user_id: int | None` to the schema and `ALL_QUERY_COLUMNS`. **`QueryFilter.col` is too narrow** Currently allows only `status`, `database_id`, `schema`. Realistic admin debugging needs `user_id` (who ran it) and `start_time` (time-range queries). The underlying Superset Query API supports these. Recommend adding both. **`SavedQueryInfo` missing `catalog` and `last_run`** The SavedQuery model has `catalog` and `last_run` (timestamp of last execution). `last_run` is particularly useful — it answers "has this query ever been executed and when". Recommend adding both to `SavedQueryInfo`, `serialize_saved_query_object`, and `ALL_SAVED_QUERY_COLUMNS`. **`SavedQueryFilter.col` missing `created_by_fk` and `catalog`** Currently only `label`, `db_id`, `schema` are filterable. The Superset SavedQuery API exposes `created_by` as a filter column. Adding `created_by_fk` enables "show me my saved queries" patterns. -- 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]
