When writing queries in SQLlab, after the relevant schema is selected in the left pane, table names get autocompleted. However if any other schema than "public" is chosen, the query will fail, because the schema name is not prefixed to the table name as part of auto completion - this defeats the purpose of autocomplete for tables names.
How to reproduce the bug
- Go to Sqllab
- Click on NewTab
- Select the relevant schema on right, e.g. "myschema"
- Write SqlQuery "select * from mytable" (use autocomplete on mytable)
- See error "mytable not found"
Expected results
The table name should autocomplete with myschema.mytable
- defeats the purpose of autocomplete otherwise
Actual results
Only the table name is autocompleted
Environment
(please complete the following information):
- browser type and version:
Chrome 120
- superset version:
2.0.0
and3.1.x
- python version:
Python 3.8.12
- node.js version:
node -v
- any feature flags active:
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [x] I have reproduced the issue with at least the latest released version of superset.
- [x] I have checked the issue tracker for the same issue and I haven't found one similar.
Comment From: rusackas
@betodealmeida @justinpark I was tempted to close this as stale, but I wanted to check with both of you first to see if this is indeed a bug that others just haven't complained about, or if something has since been updated.
@raags we no longer support 2.0... is this still happening in 3.1 or 4.0?
Comment From: raags
@rusackas I tested on 3.1 and it still happens - the bug is that the table autocomplete doesn't add the schema prefix, without which the query will fail.
Comment From: rusackas
I think this is still not a feature... and I think this is indeed a feature request more than a bug. I'm not sure if any Committers/PMC members have this on their roadmap, so we'd welcome a PR if you want to investigate this. Otherwise, I'm again tempted to close as stale or convert it to an Ideas discussion.
Comment From: rusackas
(also worth noting, we only support 4.x and above now)
Comment From: rusackas
Closing as inactive/not-planned, but still happy to reopen if anyone wants to open a PR, or we can move it to a Discussion if you want to gather some support around it!