apache/superset · error · Error
Geohash column is required for geohash type
Error message
Geohash column is required for geohash type
What it means
Thrown by getSpatialColumns when spatial.type is 'geohash' but geohashCol is missing. The geohash encoding maps a single geohash-string column to coordinates, so that column name is mandatory for the generated SQL. Companion check to the latlong/delimited branches of the same switch.
Source
Thrown at superset-frontend/plugins/preset-chart-deckgl/src/layers/spatialUtils.ts:95
switch (spatial.type) {
case 'latlong':
if (!spatial.lonCol || !spatial.latCol) {
throw new Error(
'Longitude and latitude columns are required for latlong type',
);
}
return [spatial.lonCol, spatial.latCol];
case 'delimited':
if (!spatial.lonlatCol) {
throw new Error(
'Longitude/latitude column is required for delimited type',
);
}
return [spatial.lonlatCol];
case 'geohash':
if (!spatial.geohashCol) {
throw new Error('Geohash column is required for geohash type');
}
return [spatial.geohashCol];
default:
throw new Error(`Unknown spatial type: ${spatial.type}`);
}
}
export function addSpatialNullFilters(
spatial: SpatialConfiguration,
filters: QueryObjectFilterClause[],
): QueryObjectFilterClause[] {
if (!spatial) return filters;
const spatialColumns = getSpatialColumns(spatial);
const nullFilters: QueryObjectFilterClause[] = spatialColumns.map(column => ({
col: column,
op: 'IS NOT NULL',
val: null,View on GitHub (pinned to f4587218dd)
Solutions
- Choose the geohash column in the spatial control and save the chart.
- Confirm the column exists in the dataset; restore/rename if drifted.
- Set geohashCol in code whenever type === 'geohash'.
Example fix
// before
getSpatialColumns({ type: 'geohash' }); // throws
// after
getSpatialColumns({ type: 'geohash', geohashCol: 'geohash_4' }); Defensive patterns
Strategy: validation
Validate before calling
if (spatial.type === 'geohash' && !spatial.geohashCol) {
throw new Error('geohash spatial needs geohashCol');
}
getSpatialColumns(spatial); Type guard
const isCompleteGeohash = (s: SpatialConfiguration): boolean => s.type !== 'geohash' || typeof s.geohashCol === 'string';
Try / catch
try { getSpatialColumns(spatial); } catch (e) { if (e.message.includes('geohash type')) promptForGeohashColumn(); else throw e; } Prevention
- Require the geohash column when that encoding is selected
- Guard custom code paths that build geohash configs
When it happens
Trigger: A spatial config { type: 'geohash' } reaching getSpatialColumns without geohashCol — the geohash column control was cleared or never set, or params were serialized incompletely.
Common situations: Selecting geohash encoding without picking the geohash column; the geohash column removed from the dataset; imported chart params missing the column key.
Related errors
- Start and end spatial configurations are required for Arc ch
- Spatial configuration is required for Scatter charts
- Bad spatial key
- Longitude and latitude columns are required for latlong type
- Longitude/latitude column is required for delimited type
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/5abe53258b89a6be.
Report an issue: GitHub.