fix(sqllab): pass queryLimit on data preview queries and fix Decimal TypeError in results handler (#37614)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andy
2026-02-27 18:35:44 -05:00
committed by GitHub
parent a410b76f99
commit 15d7538435
4 changed files with 6 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ import type { QueryEditor, SqlLabRootState, Table } from '../types';
import { newQueryTabName } from '../utils/newQueryTabName';
import getInitialState from '../reducers/getInitialState';
import { rehydratePersistedState } from '../utils/reduxStateToLocalStorageHelper';
import { PREVIEW_QUERY_LIMIT } from '../constants';
// Type definitions for SqlLab actions
export interface Query {
@@ -1317,6 +1318,7 @@ export function runTablePreviewQuery(
runAsync: database.allow_run_async,
ctas: false,
isDataPreview: true,
queryLimit: PREVIEW_QUERY_LIMIT,
};
if (runPreviewOnly) {
return dispatch(runQuery(dataPreviewQuery, runPreviewOnly));