Skip to content

Data Explorer: Use backend client for search #8806

@dhruvisompura

Description

@dhruvisompura

Follow up to #8804 and #8805.

Once we've got search_schema support added, we need to update DataExplorerClientInstance.searchSchema to utilize the new search_schema API the backend has provided.

This change will immediately effect the SummaryRowFilter component and its caching layer (columSchemaCache). We will need to revisit the implementation details in columSchemaCache.doUpdateCache and clean up the logic there.

I think there is a bug in the existing logic that calculates the index range we pass to searchSchema. We can get that resolved at the same time. The index range calculation should be the same as what we do in the summary panel caching layer:

		// Get the size of the data.
		const tableState = await this._dataExplorerClientInstance.getBackendState();
		this._columns = tableState.table_shape.num_columns;
		this._rows = tableState.table_shape.num_rows;

		// Set the start column index and the end column index of the columns to cache.
		const overscanColumns = screenColumns * OVERSCAN_FACTOR;
		// Determine the first column index to start caching from.
		const startColumnIndex = Math.max(
			0,
			firstColumnIndex - overscanColumns
		);
		// Determines the minimum number of columns we need to cache
		// to fill the screen (including overscan).
		const endColumnIndex = Math.min(
			tableState.table_shape.num_columns - 1,
			firstColumnIndex + screenColumns + overscanColumns
		);

Metadata

Metadata

Assignees

Labels

area: data explorerIssues related to Data Explorer category.enhancementNew feature or requestfrontendIssues having to do with the frontend (Electron) part of a category

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions