mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
feat(trino): support early cancellation of queries (#22498)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import shortid from 'shortid';
|
||||
import { t, SupersetClient } from '@superset-ui/core';
|
||||
import { SupersetClient, t } from '@superset-ui/core';
|
||||
import invert from 'lodash/invert';
|
||||
import mapKeys from 'lodash/mapKeys';
|
||||
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||
@@ -229,11 +229,13 @@ export function startQuery(query) {
|
||||
|
||||
export function querySuccess(query, results) {
|
||||
return function (dispatch) {
|
||||
const sqlEditorId = results?.query?.sqlEditorId;
|
||||
const sync =
|
||||
sqlEditorId &&
|
||||
!query.isDataPreview &&
|
||||
isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE)
|
||||
? SupersetClient.put({
|
||||
endpoint: encodeURI(`/tabstateview/${results.query.sqlEditorId}`),
|
||||
endpoint: encodeURI(`/tabstateview/${sqlEditorId}`),
|
||||
postPayload: { latest_query_id: query.id },
|
||||
})
|
||||
: Promise.resolve();
|
||||
|
||||
Reference in New Issue
Block a user