@@ -15,22 +15,16 @@ import {notify} from 'src/shared/actions/notifications'
1515import { hydrateVariables } from 'src/variables/actions/thunks'
1616
1717// Constants
18- import {
19- rateLimitReached ,
20- resultTooLarge ,
21- updateAggregateType ,
22- } from 'src/shared/copy/notifications'
18+ import { rateLimitReached , resultTooLarge } from 'src/shared/copy/notifications'
2319
2420// Utils
2521import fromFlux from 'src/shared/utils/fromFlux'
2622import { isFlagEnabled } from 'src/shared/utils/featureFlag'
2723import { buildUsedVarsOption } from 'src/variables/utils/buildVarsOption'
2824import { findNodes } from 'src/shared/utils/ast'
29- import { isAggregateTypeError } from 'src/utils/aggregateTypeErrors'
3025import { event } from 'src/cloud/utils/reporting'
3126import { asSimplyKeyValueVariables , hashCode } from 'src/shared/apis/queryCache'
3227import { filterUnusedVarsBasedOnQuery } from 'src/shared/utils/filterUnusedVars'
33- import { getAggregateTypeErrorButton } from 'src/shared/components/notifications/NotificationButtons'
3428
3529// Types
3630import { CancelBox } from 'src/types/promises'
@@ -44,7 +38,6 @@ import {
4438 QueryEditMode ,
4539 BuilderTagsType ,
4640 Variable ,
47- NotificationButtonElement ,
4841} from 'src/types'
4942
5043// Selectors
@@ -333,16 +326,6 @@ export const executeQueries = (abortController?: AbortController) => async (
333326
334327 for ( const result of results ) {
335328 if ( result . type === 'UNKNOWN_ERROR' ) {
336- if (
337- isAggregateTypeError ( result . code , result . message ) &&
338- state . currentExplorer . isAutoFunction
339- ) {
340- const message = `It looks like you're trying to apply a number-based aggregate function to a string, which cannot be processed. You can fix this by selecting the Aggregate Function "Last"`
341- const buttonElement : NotificationButtonElement = onDismiss =>
342- getAggregateTypeErrorButton ( onDismiss )
343- dispatch ( notify ( updateAggregateType ( message , buttonElement ) ) )
344- }
345-
346329 throw new Error ( result . message )
347330 }
348331
0 commit comments