From cb8b5f22228dafe2d1ecb5d8d24ad6008ae4afae Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 16:05:18 -0700 Subject: [PATCH] Bug fixes and UI updates for datasources (#1618) (#1625) * fixing bug with loading table columns * UI changes for datasources * adding try catch to database cache getters * addressing comments * adding refresh to create accelerations * removing osd config --------- (cherry picked from commit 9428002b214d8b64846ae7134e725e4fbeb8c7d4) Signed-off-by: Sean Li Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- common/types/data_connections.ts | 2 +- .../associated_objects_tab.test.tsx.snap | 247 +++++++++++++++--- .../acceleration_action_overlay.tsx | 2 +- .../accelerations/acceleration_table.tsx | 1 + .../create/create_acceleration.tsx | 2 + .../create/create_acceleration_button.tsx | 3 + .../utils/acceleration_utils.tsx | 20 +- .../associated_objects_details_flyout.tsx | 35 ++- .../associated_objects_tab.tsx | 29 +- .../modules/associated_objects_table.tsx | 64 +++-- public/plugin.tsx | 25 +- public/types.ts | 13 +- test/datasources.ts | 2 +- 13 files changed, 350 insertions(+), 95 deletions(-) diff --git a/common/types/data_connections.ts b/common/types/data_connections.ts index 249531f91..f7901e051 100644 --- a/common/types/data_connections.ts +++ b/common/types/data_connections.ts @@ -41,7 +41,7 @@ export interface AssociatedObject { name: string; database: string; type: AssociatedObjectIndexType; - accelerations: CachedAcceleration[]; + accelerations: CachedAcceleration[] | AssociatedObject; columns?: CachedColumn[]; } diff --git a/public/components/datasources/components/__tests__/__snapshots__/associated_objects_tab.test.tsx.snap b/public/components/datasources/components/__tests__/__snapshots__/associated_objects_tab.test.tsx.snap index 231505e1c..1be89aacd 100644 --- a/public/components/datasources/components/__tests__/__snapshots__/associated_objects_tab.test.tsx.snap +++ b/public/components/datasources/components/__tests__/__snapshots__/associated_objects_tab.test.tsx.snap @@ -319,6 +319,7 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object > - Accelerations + Associations @@ -1962,7 +2048,7 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object key="_data_column_accelerations_0_2" mobileOptions={ Object { - "header": "Accelerations", + "header": "Associations", "render": undefined, } } @@ -1980,12 +2066,25 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
- Accelerations + Associations
- - + + +
@@ -2023,7 +2122,25 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object className="euiTableCellContent__hoverItem" item={ Object { - "accelerations": Array [], + "accelerations": Object { + "accelerations": Array [ + Object { + "autoRefresh": true, + "database": "mock_database_1", + "flintIndexName": "mock_acceleration_1", + "indexName": "mock_acceleration_1", + "status": "", + "table": "mock_table_1", + "type": "skipping", + }, + ], + "columns": undefined, + "database": "mock_database_1", + "datasource": "mock_data_source", + "id": "mock_table_1", + "name": "mock_table_1", + "type": "table", + }, "columns": undefined, "database": "mock_database_1", "datasource": "mock_data_source", @@ -2050,7 +2167,25 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object enabled={true} item={ Object { - "accelerations": Array [], + "accelerations": Object { + "accelerations": Array [ + Object { + "autoRefresh": true, + "database": "mock_database_1", + "flintIndexName": "mock_acceleration_1", + "indexName": "mock_acceleration_1", + "status": "", + "table": "mock_table_1", + "type": "skipping", + }, + ], + "columns": undefined, + "database": "mock_database_1", + "datasource": "mock_data_source", + "id": "mock_table_1", + "name": "mock_table_1", + "type": "table", + }, "columns": undefined, "database": "mock_database_1", "datasource": "mock_data_source", @@ -2229,7 +2364,7 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object key="_data_column_accelerations_1_2" mobileOptions={ Object { - "header": "Accelerations", + "header": "Associations", "render": undefined, } } @@ -2247,7 +2382,7 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
- Accelerations + Associations
- Accelerations + Associations
- - + + +
@@ -2565,7 +2713,17 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object className="euiTableCellContent__hoverItem" item={ Object { - "accelerations": Array [], + "accelerations": Array [ + Object { + "autoRefresh": true, + "database": "mock_database_1", + "flintIndexName": "mock_acceleration_1", + "indexName": "mock_acceleration_1", + "status": "", + "table": "mock_table_1", + "type": "skipping", + }, + ], "columns": undefined, "database": "mock_database_1", "datasource": "mock_data_source", @@ -2592,7 +2750,17 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object enabled={true} item={ Object { - "accelerations": Array [], + "accelerations": Array [ + Object { + "autoRefresh": true, + "database": "mock_database_1", + "flintIndexName": "mock_acceleration_1", + "indexName": "mock_acceleration_1", + "status": "", + "table": "mock_table_1", + "type": "skipping", + }, + ], "columns": undefined, "database": "mock_database_1", "datasource": "mock_data_source", @@ -2689,7 +2857,17 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object enabled={true} item={ Object { - "accelerations": Array [], + "accelerations": Array [ + Object { + "autoRefresh": true, + "database": "mock_database_1", + "flintIndexName": "mock_acceleration_1", + "indexName": "mock_acceleration_1", + "status": "", + "table": "mock_table_1", + "type": "skipping", + }, + ], "columns": undefined, "database": "mock_database_1", "datasource": "mock_data_source", @@ -2868,7 +3046,7 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object key="_data_column_accelerations_3_2" mobileOptions={ Object { - "header": "Accelerations", + "header": "Associations", "render": undefined, } } @@ -2886,7 +3064,7 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
- Accelerations + Associations
- Accelerations + Associations
- Accelerations + Associations
- Accelerations + Associations
break; case 'delete': title = `Delete acceleration ${displayIndexName} on ${displayFullPath} ?`; - description = ACC_DELETE_MSG; + description = ACC_DELETE_MSG(displayIndexName); confirmButtonText = 'Delete'; break; case 'sync': diff --git a/public/components/datasources/components/manage/accelerations/acceleration_table.tsx b/public/components/datasources/components/manage/accelerations/acceleration_table.tsx index 42deb7b42..266d77c8f 100644 --- a/public/components/datasources/components/manage/accelerations/acceleration_table.tsx +++ b/public/components/datasources/components/manage/accelerations/acceleration_table.tsx @@ -168,6 +168,7 @@ export const AccelerationTable = ({ diff --git a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration.tsx b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration.tsx index da0dc8707..5f0998d8e 100644 --- a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration.tsx +++ b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration.tsx @@ -52,6 +52,7 @@ export const CreateAcceleration = ({ resetFlyout, databaseName, tableName, + refreshHandler, }: CreateAccelerationProps) => { const { setToast } = useToast(); const http = coreRefs!.http; @@ -259,6 +260,7 @@ export const CreateAcceleration = ({ accelerationFormData={accelerationFormData} setAccelerationFormData={setAccelerationFormData} resetFlyout={resetFlyout} + refreshHandler={refreshHandler} /> diff --git a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration_button.tsx b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration_button.tsx index 8a8724827..76d668276 100644 --- a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration_button.tsx +++ b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/create/create_acceleration_button.tsx @@ -20,12 +20,14 @@ interface CreateAccelerationButtonProps { accelerationFormData: CreateAccelerationForm; setAccelerationFormData: React.Dispatch>; resetFlyout: () => void; + refreshHandler?: () => void; } export const CreateAccelerationButton = ({ accelerationFormData, setAccelerationFormData, resetFlyout, + refreshHandler, }: CreateAccelerationButtonProps) => { const { setToast } = useToast(); const { loadStatus: directqueryLoadStatus, startLoading: startDirectQuery } = useDirectQuery(); @@ -53,6 +55,7 @@ export const CreateAccelerationButton = ({ if (status === DirectQueryLoadingStatus.SUCCESS) { setIsLoading(false); setToast('Create acceleration query submitted successfully!', 'success'); + if (refreshHandler) refreshHandler(); resetFlyout(); } else if ( status === DirectQueryLoadingStatus.FAILED || diff --git a/public/components/datasources/components/manage/accelerations/utils/acceleration_utils.tsx b/public/components/datasources/components/manage/accelerations/utils/acceleration_utils.tsx index 31dca1dc6..84b674739 100644 --- a/public/components/datasources/components/manage/accelerations/utils/acceleration_utils.tsx +++ b/public/components/datasources/components/manage/accelerations/utils/acceleration_utils.tsx @@ -16,8 +16,8 @@ export const ACC_PANEL_TITLE = 'Accelerations'; export const ACC_PANEL_DESC = 'Accelerations optimize query performance by indexing external data into OpenSearch.'; export const ACC_LOADING_MSG = 'Loading/Refreshing accelerations...'; -export const ACC_DELETE_MSG = - 'The acceleration will be deleted. User will no longer be able to view from this acceleration. By default data will be retained in the associated index.'; +export const ACC_DELETE_MSG = (name: string) => + `Are you sure you want to delete ${name}? Any accelerations associated with this data source will also be deleted.This action cannot be undone.`; export const ACC_VACUUM_MSG = 'Vacuuming will remove the actual data from the disk since the associated index will be removed from the cluster. To confirm your action, type the name of the acceleration below.'; export const ACC_SYNC_MSG = 'Syncing data may require querying all data. Do you want to continue?'; @@ -88,13 +88,25 @@ export const generateAccelerationOperationQuery = ( export const CreateAccelerationFlyoutButton = ({ dataSourceName, renderCreateAccelerationFlyout, + handleRefresh, }: { dataSourceName: string; - renderCreateAccelerationFlyout: (dataSourceName: string) => void; + renderCreateAccelerationFlyout: ( + dataSource: string, + databaseName?: string, + tableName?: string, + handleRefresh?: () => void + ) => void; + handleRefresh: () => void; }) => { return ( <> - renderCreateAccelerationFlyout(dataSourceName)} fill> + + renderCreateAccelerationFlyout(dataSourceName, undefined, undefined, handleRefresh) + } + fill + > Create acceleration diff --git a/public/components/datasources/components/manage/associated_objects/associated_objects_details_flyout.tsx b/public/components/datasources/components/manage/associated_objects/associated_objects_details_flyout.tsx index 608332eba..bd230df12 100644 --- a/public/components/datasources/components/manage/associated_objects/associated_objects_details_flyout.tsx +++ b/public/components/datasources/components/manage/associated_objects/associated_objects_details_flyout.tsx @@ -48,6 +48,7 @@ import { DATA_SOURCE_TYPES } from '../../../../../../common/constants/data_sourc import { useLoadTableColumnsToCache } from '../../../../../../public/framework/catalog_cache/cache_loader'; import { CatalogCacheManager } from '../../../../../../public/framework/catalog_cache/cache_manager'; import { DirectQueryLoadingStatus } from '../../../../../../common/types/explorer'; +import { useToast } from '../../../../../../public/components/common/toast'; export interface AssociatedObjectsFlyoutProps { tableDetail: AssociatedObject; @@ -65,9 +66,9 @@ export const AssociatedObjectsDetailsFlyout = ({ const { loadStatus, startLoading } = useLoadTableColumnsToCache(); const [tableColumns, setTableColumns] = useState([]); const [schemaData, setSchemaData] = useState([]); + const { setToast } = useToast(); const DiscoverButton = () => { - // TODO: display button if can be sent to discover return ( { @@ -90,7 +91,12 @@ export const AssociatedObjectsDetailsFlyout = ({ return ( - renderCreateAccelerationFlyout(datasourceName, tableDetail.database, tableDetail.name) + renderCreateAccelerationFlyout( + datasourceName, + tableDetail.database, + tableDetail.name, + handleRefresh + ) } > @@ -185,7 +191,12 @@ export const AssociatedObjectsDetailsFlyout = ({ color="primary" fill onClick={() => - renderCreateAccelerationFlyout(datasourceName, tableDetail.database, tableDetail.name) + renderCreateAccelerationFlyout( + datasourceName, + tableDetail.database, + tableDetail.name, + handleRefresh + ) } iconType="popout" iconSide="left" @@ -223,12 +234,18 @@ export const AssociatedObjectsDetailsFlyout = ({ useEffect(() => { if (loadStatus.toLowerCase() === DirectQueryLoadingStatus.SUCCESS) { - const columns = CatalogCacheManager.getTable( - datasourceName, - tableDetail.database, - tableDetail.name - ).columns; - setTableColumns(columns); + let columns; + try { + columns = CatalogCacheManager.getTable( + datasourceName, + tableDetail.database, + tableDetail.name + ).columns; + setTableColumns(columns); + } catch (error) { + console.error(error); + setToast('Your cache is outdated, refresh databases and tables', 'warning'); + } } }, [loadStatus]); diff --git a/public/components/datasources/components/manage/associated_objects/associated_objects_tab.tsx b/public/components/datasources/components/manage/associated_objects/associated_objects_tab.tsx index 33ea10223..bd8936872 100644 --- a/public/components/datasources/components/manage/associated_objects/associated_objects_tab.tsx +++ b/public/components/datasources/components/manage/associated_objects/associated_objects_tab.tsx @@ -15,6 +15,7 @@ import { EuiSelectable, } from '@elastic/eui'; import { i18n } from '@osd/i18n'; +import { useToast } from '../../../../../../public/components/common/toast'; import { ACCELERATION_INDEX_TYPES } from '../../../../../../common/constants/data_sources'; import { AssociatedObject, @@ -65,6 +66,7 @@ export const AssociatedObjectsTab: React.FC = (props) const [isFirstTimeLoading, setIsFirstTimeLoading] = useState(true); const [databasesLoadFailed, setDatabasesLoadFailed] = useState(false); const [associatedObjectsLoadFailed, setAssociatedObjectsLoadFailed] = useState(false); + const { setToast } = useToast(); const { databasesLoadStatus, @@ -150,6 +152,7 @@ export const AssociatedObjectsTab: React.FC = (props) @@ -206,7 +209,14 @@ export const AssociatedObjectsTab: React.FC = (props) // Load tables and accelerations if empty or retrieve from cache if not useEffect(() => { if (datasource.name && selectedDatabase) { - const databaseCache = CatalogCacheManager.getDatabase(datasource.name, selectedDatabase); + let databaseCache; + try { + databaseCache = CatalogCacheManager.getDatabase(datasource.name, selectedDatabase); + } catch (error) { + console.error(error); + setToast('Your cache is outdated, refresh databases and tables', 'warning'); + return; + } const accelerationsCache = CatalogCacheManager.getOrCreateAccelerationsByDataSource( datasource.name ); @@ -238,7 +248,14 @@ export const AssociatedObjectsTab: React.FC = (props) useEffect(() => { if (datasource.name && selectedDatabase) { const tablesStatus = tablesLoadStatus.toLowerCase(); - const databaseCache = CatalogCacheManager.getDatabase(datasource.name, selectedDatabase); + let databaseCache; + try { + databaseCache = CatalogCacheManager.getDatabase(datasource.name, selectedDatabase); + } catch (error) { + console.error(error); + setToast('Your cache is outdated, refresh databases and tables', 'warning'); + return; + } const accelerationsStatus = accelerationsLoadStatus.toLowerCase(); const accelerationsCache = CatalogCacheManager.getOrCreateAccelerationsByDataSource( datasource.name @@ -319,7 +336,12 @@ export const AssociatedObjectsTab: React.FC = (props) database: acceleration.database, type: ACCELERATION_INDEX_TYPES.find((accelType) => accelType.value === acceleration.type)! .value as AssociatedObjectIndexType, - accelerations: [], + accelerations: + acceleration.type === 'covering' || acceleration.type === 'skipping' + ? tableObjects.find( + (tableObject: AssociatedObject) => tableObject.name === acceleration.table + ) + : [], columns: undefined, })); setAssociatedObjects([...tableObjects, ...accelerationObjects]); @@ -379,6 +401,7 @@ export const AssociatedObjectsTab: React.FC = (props) datasourceName={datasource.name} associatedObjects={associatedObjects} cachedAccelerations={cachedAccelerations} + handleRefresh={onRefreshButtonClick} /> ) : ( diff --git a/public/components/datasources/components/manage/associated_objects/modules/associated_objects_table.tsx b/public/components/datasources/components/manage/associated_objects/modules/associated_objects_table.tsx index a46b0c090..f559135da 100644 --- a/public/components/datasources/components/manage/associated_objects/modules/associated_objects_table.tsx +++ b/public/components/datasources/components/manage/associated_objects/modules/associated_objects_table.tsx @@ -10,7 +10,6 @@ import { EuiLink, SearchFilterConfig, EuiTableFieldDataColumnType, - EuiButtonEmpty, } from '@elastic/eui'; import { i18n } from '@osd/i18n'; import { @@ -39,6 +38,7 @@ interface AssociatedObjectsTableProps { datasourceName: string; associatedObjects: AssociatedObject[]; cachedAccelerations: CachedAcceleration[]; + handleRefresh: () => void; } interface FilterOption { @@ -54,7 +54,7 @@ interface AssociatedTableFilter { } export const AssociatedObjectsTable = (props: AssociatedObjectsTableProps) => { - const { datasourceName, associatedObjects, cachedAccelerations } = props; + const { datasourceName, associatedObjects, cachedAccelerations, handleRefresh } = props; const [accelerationFilterOptions, setAccelerationFilterOptions] = useState([]); const [filteredObjects, setFilteredObjects] = useState([]); @@ -70,7 +70,7 @@ export const AssociatedObjectsTable = (props: AssociatedObjectsTableProps) => { { if (item.type === 'table') { - renderAssociatedObjectsDetailsFlyout(item, datasourceName); + renderAssociatedObjectsDetailsFlyout(item, datasourceName, handleRefresh); } else { const acceleration = cachedAccelerations.find((acc) => acc.indexName === item.id); if (acceleration) { @@ -97,34 +97,45 @@ export const AssociatedObjectsTable = (props: AssociatedObjectsTableProps) => { { field: 'accelerations', name: i18n.translate('datasources.associatedObjectsTab.column.accelerations', { - defaultMessage: 'Accelerations', + defaultMessage: 'Associations', }), sortable: true, - render: (accelerations: CachedAcceleration[], obj: AssociatedObject) => { - if (accelerations.length === 0) { - return '-'; - } else if (accelerations.length === 1) { - const name = getAccelerationName(accelerations[0]); + render: (accelerations: CachedAcceleration[] | AssociatedObject, obj: AssociatedObject) => { + if (Array.isArray(accelerations)) { + if (accelerations.length === 0) { + return '-'; + } else if (accelerations.length === 1) { + const name = getAccelerationName(accelerations[0]); + return ( + + renderAccelerationDetailsFlyout(accelerations[0], datasourceName, handleRefresh) + } + > + {name} + + ); + } return ( { - renderAccelerationDetailsFlyout(accelerations[0], datasourceName); - }} + onClick={() => + renderAssociatedObjectsDetailsFlyout(obj, datasourceName, handleRefresh) + } + > + View all {accelerations.length} + + ); + } else { + return ( + + renderAssociatedObjectsDetailsFlyout(accelerations, datasourceName, handleRefresh) + } > - {name} + {accelerations.name} ); } - return ( - { - renderAssociatedObjectsDetailsFlyout(obj, datasourceName); - }} - size="xs" - > - View all {accelerations.length} - - ); }, }, { @@ -175,7 +186,7 @@ export const AssociatedObjectsTable = (props: AssociatedObjectsTableProps) => { icon: 'bolt', available: (item: AssociatedObject) => item.type === 'table', onClick: (item: AssociatedObject) => - renderCreateAccelerationFlyout(datasourceName, item.database, item.name), + renderCreateAccelerationFlyout(datasourceName, item.database, item.name, handleRefresh), }, ], }, @@ -196,10 +207,7 @@ export const AssociatedObjectsTable = (props: AssociatedObjectsTableProps) => { return clauses.some((clause) => { if (clause.field !== ASSC_OBJ_TABLE_ACC_COLUMN_NAME) { return associatedObject[clause.field] === clause.value; - } else if ( - clause.field === ASSC_OBJ_TABLE_ACC_COLUMN_NAME && - Array.isArray(associatedObject.accelerations) - ) { + } else if (clause.field === ASSC_OBJ_TABLE_ACC_COLUMN_NAME) { return associatedObject.type !== 'table' && associatedObject.name === clause.value; } diff --git a/public/plugin.tsx b/public/plugin.tsx index 6b2b65ccf..c3416c759 100644 --- a/public/plugin.tsx +++ b/public/plugin.tsx @@ -114,16 +114,21 @@ export const [ export const [ getRenderAssociatedObjectsDetailsFlyout, setRenderAssociatedObjectsDetailsFlyout, -] = createGetterSetter<(tableDetail: AssociatedObject, datasourceName: string) => void>( - 'renderAssociatedObjectsDetailsFlyout' -); +] = createGetterSetter< + (tableDetail: AssociatedObject, datasourceName: string, handleRefresh?: () => void) => void +>('renderAssociatedObjectsDetailsFlyout'); export const [ getRenderCreateAccelerationFlyout, setRenderCreateAccelerationFlyout, -] = createGetterSetter<(dataSource: string, databaseName?: string, tableName?: string) => void>( - 'renderCreateAccelerationFlyout' -); +] = createGetterSetter< + ( + dataSource: string, + databaseName?: string, + tableName?: string, + handleRefresh?: () => void + ) => void +>('renderCreateAccelerationFlyout'); export class ObservabilityPlugin implements @@ -421,7 +426,8 @@ export class ObservabilityPlugin const renderAssociatedObjectsDetailsFlyout = ( tableDetail: AssociatedObject, - datasourceName: string + datasourceName: string, + handleRefresh?: () => void ) => { const associatedObjectsDetailsFlyout = core.overlays.openFlyout( toMountPoint( @@ -429,6 +435,7 @@ export class ObservabilityPlugin tableDetail={tableDetail} datasourceName={datasourceName} resetFlyout={() => associatedObjectsDetailsFlyout.close()} + handleRefresh={handleRefresh} /> ) ); @@ -438,7 +445,8 @@ export class ObservabilityPlugin const renderCreateAccelerationFlyout = ( selectedDatasource: string, databaseName?: string, - tableName?: string + tableName?: string, + handleRefresh?: () => void ) => { const createAccelerationFlyout = core.overlays.openFlyout( toMountPoint( @@ -447,6 +455,7 @@ export class ObservabilityPlugin resetFlyout={() => createAccelerationFlyout.close()} databaseName={databaseName} tableName={tableName} + refreshHandler={handleRefresh} /> ) ); diff --git a/public/types.ts b/public/types.ts index 83cc3a619..8f791bdd3 100644 --- a/public/types.ts +++ b/public/types.ts @@ -45,15 +45,16 @@ export interface ObservabilityStart { datasourceName: string, handleRefresh?: () => void ) => void; - renderAssociatedObjectsDetailsFlyout: ({ - tableDetail, - }: { - tableDetail: AssociatedObject; - }) => void; + renderAssociatedObjectsDetailsFlyout: ( + tableDetail: AssociatedObject, + datasourceName: string, + handleRefresh?: () => void + ) => void; renderCreateAccelerationFlyout: ( dataSource: string, databaseName?: string, - tableName?: string + tableName?: string, + handleRefresh?: () => void ) => void; CatalogCacheManagerInstance: typeof CatalogCacheManager; useLoadDatabasesToCacheHook: () => LoadCachehookOutput; diff --git a/test/datasources.ts b/test/datasources.ts index 7cb6d3b27..350148e07 100644 --- a/test/datasources.ts +++ b/test/datasources.ts @@ -942,7 +942,7 @@ export const mockAccelerationCacheData: AccelerationsCacheData = { flintIndexName: 'mock_acceleration_1', type: 'skipping', database: 'mock_database_1', - table: '', + table: 'mock_table_1', indexName: 'mock_acceleration_1', autoRefresh: true, status: '',