console
console copied to clipboard
Fix spatial index column issue
Based on the PR branch history, this appears to be an initial repository setup commit rather than a specific spatial index fix. The commit titled "fix spatial index column issue" includes the entire console codebase initialization.
The createIndex.svelte component includes spatial index handling logic that:
- Filters columns to show only spatial types (Point, Line, Polygon) when
IndexType.Spatialis selected - Enforces single-column constraint for spatial indexes
- Sets order to
nullfor spatial indexes (spatial indexes don't use ordering) - Resets column selection when switching between spatial and non-spatial index types
// Spatial indexes require exactly one spatial column with null order
if (selectedType === IndexType.Spatial) {
const currentColumn = columnList.at(0)?.value;
const currentColumnObj = $table.columns.find(col => col.key === currentColumn);
if (!currentColumn || !currentColumnObj || !isSpatialType(currentColumnObj)) {
columnList = [{ value: '', order: null, length: null }];
}
}
Note: Unable to identify the specific spatial index bug that was fixed without access to the original issue or a proper diff against the base branch.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.