apache/druid · error · RE

Unknown primitive conversion

Error message

Unknown primitive conversion: %s

What it means

Default branch of ParquetGroupConverter.convertPrimitiveField: the parquet primitive type encountered has no mapping in the converter (an unmapped/unrecognized primitive), so the record cannot be converted to a Druid value.

Solutions

  1. Identify the primitive type from the error and check supported types for the parquet-extensions version.
  2. Upgrade parquet-extensions or convert the column to a supported type (BOOLEAN, INT32/64, FLOAT, DOUBLE, BINARY, etc.).
  3. Use flattenSpec/exclusion to skip the unsupported column.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java:486 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/15a24712ac52a950. Report an issue: GitHub.

Appendix: source

Thrown at extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java:486

            return g.getLong(fieldIndex, index);
          case FLOAT:
            return g.getFloat(fieldIndex, index);
          case DOUBLE:
            return g.getDouble(fieldIndex, index);
          case INT96:
            Binary tsBin = g.getInt96(fieldIndex, index);
            return convertInt96BinaryToTimestamp(tsBin);
          case FIXED_LEN_BYTE_ARRAY:
          case BINARY:
            Binary bin = g.getBinary(fieldIndex, index);
            byte[] bytes = bin.getBytes();
            if (binaryAsString) {
              return StringUtils.fromUtf8(bytes);
            } else {
              return bytes;
            }
          default:
            throw new RE("Unknown primitive conversion: %s", pt.getPrimitiveTypeName());
        }
      }
    }
    catch (Exception ex) {
      return null;
    }
  }

  private long convertDateToMillis(int value)
  {
    if (convertCorruptDates) {
      value -= CORRECT_CORRUPT_DATE_SHIFT;
    }
    return value * MILLIS_IN_DAY;
  }

  /**
   * convert deprecated parquet int96 nanosecond timestamp to a long, based on

View on GitHub (pinned to 9b90983fd2)