Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

fix: detect h3 column in arrow (#3230)

Xun Lid2b130f95c5a
diff --git a/src/processors/src/data-processor.ts b/src/processors/src/data-processor.ts
index 31386a53f..d18a61bf7 100644
--- a/src/processors/src/data-processor.ts
+++ b/src/processors/src/data-processor.ts
@@ -494,6 +494,10 @@ export function arrowSchemaToFields(
type = keplerField.type;
analyzerType = keplerField.analyzerType;
format = keplerField.format;
+ } else if (fieldTypeSuggestion === 'VARCHAR' && keplerField.type === ALL_FIELD_TYPES.h3) {
+ // when kepler detected h3 column using getFieldsFromData(), set type to h3 and analyzerType to H3
+ type = ALL_FIELD_TYPES.h3;
+ analyzerType = keplerField.analyzerType;
} else {
// TODO should we use Kepler getFieldsFromData instead
// of arrowDataTypeToFieldType for all fields?