Skip to content

Conversation

@lixun910
Copy link
Collaborator

Fix an issue that h3 column can not be detected when using arrow table.

in arrowSchemaToFields() function:

getFieldsFromData() was first used to detect H3 columns:

const keplerFields = getFieldsFromData(sample, headerRow);

If there is a H3 column, it will be recorded in keplerFields. However, when go through the table.schema.fields, the type and analyzeType are initialized as string and AnalyzerDATA_TYPES.STRING since the H3 column is VARCHAR.

So, there is a missing case for H3

    } 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 {

Otherwise, the type will be overwritten as 'string', and analyzeType will be AnalyzerDATA_TYPES.STRING

@lixun910 lixun910 requested review from Copilot and igorDykhta and removed request for Copilot October 27, 2025 22:04
@lixun910 lixun910 merged commit d2b130f into master Oct 27, 2025
7 checks passed
@lixun910 lixun910 deleted the xli-fix-detect-h3-column-in-arrow branch October 27, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants