diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx index 240f110f5d4f9..b81b4714628ce 100644 --- a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx +++ b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx @@ -247,16 +247,9 @@ export default class ResultSet extends React.PureComponent< this.clearQueryResults(nextProps.query), ); } - - // Only fetch results if the result key change - // If we didn't have a result key before, then the results are loaded elsewhere - // so we can skip it, unless the query id changed, in that case we should - // refetch regardless. if ( - (this.props.query.resultsKey && - nextProps.query.resultsKey && - nextProps.query.resultsKey !== this.props.query.resultsKey) || - (nextProps.query.id !== this.props.query.id && nextProps.query.resultsKey) + nextProps.query.resultsKey && + nextProps.query.resultsKey !== this.props.query.resultsKey ) { this.fetchResults(nextProps.query); } diff --git a/superset-frontend/src/SqlLab/reducers/sqlLab.js b/superset-frontend/src/SqlLab/reducers/sqlLab.js index 1c417af8b871c..923caaf96152d 100644 --- a/superset-frontend/src/SqlLab/reducers/sqlLab.js +++ b/superset-frontend/src/SqlLab/reducers/sqlLab.js @@ -328,10 +328,8 @@ export default function sqlLabReducer(state = {}, action) { if (action.query.state === 'stopped') { return state; } - const alts = { endDttm: now(), - resultsKey: action?.results?.query?.resultsKey, progress: 100, results: action.results, rows: action?.results?.query?.rows || 0, diff --git a/superset/sql_lab.py b/superset/sql_lab.py index 567ff0d13d592..49de3df95752a 100644 --- a/superset/sql_lab.py +++ b/superset/sql_lab.py @@ -528,8 +528,6 @@ def execute_sql_statements( # pylint: disable=too-many-arguments, too-many-loca if store_results and results_backend: key = str(uuid.uuid4()) - payload["query"]["resultsKey"] = key - logger.info( "Query %s: Storing results in results backend, key: %s", str(query_id), key )