Under the MDS environment, when the redirection from datasource management to query workbench happens, there is a cluster selection mismatch.
BackGround
With the support of MDS in 2.14+, query workbench itself has the ability to consume the remote cluster api calls for query the remote content, since it has a global data picker for cluster selection. However, when other plugins, such as, data source management, is trying to redirect into the query workbench, it doesn't has the mechanism to point the query to a specific cluster.
The above issue gets surfaced up, since the original global datasource picker in data source management that introduced in PR:
According to this, when redirection to query workbench happens in data source management, query workbench will always treat as the targeting cluster as the the current global value of the current cluster, which in the above case, the global value is not being setup, so it will always select the default cluster.
Here is a video of how to reproduce the issue:
Enable MDS and connect to a remote cluster.
Get a flint setup domain on local cluster
Go to Datasource management page and select the flint datasource in the "direct query connections" tab for the local cluster
Click into the detailed connection page, and click on the "Create Acceleration" card/button, so that it will pop up the Flint acceleration creation flow as a flyout.
Try to filling the required field, for a creation of Skipping/MV/CV/
Select "Preview SQL Definition" and click on "Edit in query workbench"
When the redirection happens, even the query that generated in datasource management for local cluster's flint datasource is pasted in query workbench,. However, the cluster picker in query workbench shows the user is querying in the remote cluster, since that is the default cluster.
Query workbench should has an implementation to consume the cluster selection for redirection. (e.g. cluster id) - so that, when the redirection in data source management happens, it knows which remote cluster is this redirection referring to.
Datasource management should also adapt the above change by passing the cluster identifier to query workbench.
Problem to solve
Under the MDS environment, when the redirection from datasource management to query workbench happens, there is a cluster selection mismatch.
BackGround
With the support of MDS in
2.14+
, query workbench itself has the ability to consume the remote cluster api calls for query the remote content, since it has a global data picker for cluster selection. However, when other plugins, such as, data source management, is trying to redirect into the query workbench, it doesn't has the mechanism to point the query to a specific cluster.The above issue gets surfaced up, since the original global datasource picker in data source management that introduced in PR:
was removed in PR:
According to this, when redirection to query workbench happens in data source management, query workbench will always treat as the targeting cluster as the the current global value of the current cluster, which in the above case, the global value is not being setup, so it will always select the
default
cluster.Here is a video of how to reproduce the issue:
https://github.com/user-attachments/assets/0fceb520-d4df-48e7-a482-36bb02bcf8a7
How to resolve this issue