justinpark commented on PR #37298:
URL: https://github.com/apache/superset/pull/37298#issuecomment-3791429467

   > justinpark kasiazjc About the database/catalog/schema selection, I think 
we have 2 options:
   > 
   > ### 1. We keep database selection separated from catalog/schema
   > In this scenario, the tree only shows the catalogs/schemas of a selected 
database. To change the database, a user would go to the tree toolbar at the 
top and there would be an icon there to change the database. The toolbar in 
this scenario would have 3 actions: change database, refresh tree, collapse 
tree.
   > 
   > Then, in the editor, we could have only selects as kasiazjc mentioned 
before. By default, it would be only the schema selector and if catalogs exist, 
then 2 selects.
   > 
   > In this option, every time you change the tab, the tree will be different 
(re-render) because you may have different databases selected.
   > 
   > ### 2. We display databases as nodes in the tree
   > In this scenario, database/catalog/schema are selected only in the editor 
using a component that shows the current selections and when clicked, opens a 
popup with 3 selects (database, catalog, schema).
   > 
   > In this option, the tree does not change when changing tabs. We could 
expand the selected database and collapse the other ones when changing tabs if 
we want a more dynamic tree.
   > 
   > Also, as geido commented on the SIP:
   > 
   > > It's important to note that the SQL Editor allows for cross-schema 
queries, so the association between the dropdown and the editor isn't 
necessarily exclusive.
   > 
   > The catalog/schema in the editor are default values instead of 
restrictions to the query. This is used when there's a query like `SELECT * 
from cleaned_sales_data` (no schema) instead of `SELECT * from 
public.cleaned_sales.data`.
   > 
   > kasiazjc We might need a better way to make this more clear. Maybe saying 
"Default schema" and a tooltip is sufficient?
   > 
   > WDYT?
   
   As previously discussed in SIP-111, there are issues with approach #2 from a 
performance perspective, so I think approach #1 is a slightly better option.
   


-- 
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]

Reply via email to