{"record":{"id":"206278080dd7d490","repo":"apache/iceberg","slug":"unsupported-mode-for-timestamp-int96-reader-m","errorCode":null,"errorMessage":"Unsupported mode for timestamp int96 reader: \" + mode","messagePattern":"Unsupported mode for timestamp int96 reader: \" \\+ mode","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedParquetDefinitionLevelReader.java","lineNumber":545,"sourceCode":"        int numValues,\n        NullabilityHolder holder,\n        int typeWidth) {\n      switch (mode) {\n        case RLE:\n          reader\n              .timestampInt96DictEncodedReader()\n              .nextBatch(vector, idx, numValues, dict, holder, typeWidth);\n          break;\n        case PACKED:\n          ByteBuffer buffer =\n              dict.decodeToBinary(reader.readInteger())\n                  .toByteBuffer()\n                  .order(ByteOrder.LITTLE_ENDIAN);\n          long timestampInt96 = ParquetUtil.extractTimestampInt96(buffer);\n          vector.getDataBuffer().setLong((long) idx * typeWidth, timestampInt96);\n          break;\n        default:\n          throw new UnsupportedOperationException(\n              \"Unsupported mode for timestamp int96 reader: \" + mode);\n      }\n    }\n  }\n\n  class FixedSizeBinaryReader extends BaseReader {\n    @Override\n    protected void nextVal(\n        FieldVector vector,\n        int idx,\n        VectorizedValuesReader valuesReader,\n        int typeWidth,\n        byte[] byteArray) {\n      valuesReader.readBinary(typeWidth).toByteBuffer().get(byteArray, 0, typeWidth);\n      ((FixedSizeBinaryVector) vector).set(idx, byteArray);\n    }\n\n    @Override","sourceCodeStart":527,"sourceCodeEnd":563,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedParquetDefinitionLevelReader.java#L527-L563","documentation":"TimestampInt96Reader.nextDictEncodedVal dispatches on the decode Mode (the dictionary decoding strategy) and throws UnsupportedOperationException for any Mode it does not explicitly implement. Only the modes handled in its switch produce values; others are treated as unsupported for INT96 timestamp dictionary reads.","triggerScenarios":"Reading dictionary-encoded INT96 (legacy timestamp) Parquet pages where the dictionary decode Mode passed to nextDictEncodedVal is not one of the implemented variants, during packed dictionary decoding of rows (e.g. from timestampInt96ReaderPackedDictionaryDecodeDecodesRowsCorrectly).","commonSituations":"Reading legacy Hive/Spark 1.x/Impala-written Parquet files that store timestamps as INT96 with dictionary encoding, consumed via the Iceberg vectorized Arrow reader using an unimplemented decode mode.","solutions":["Rewrite the data with INT64 (TIMESTAMP_MICROS/MILLIS) logical type instead of INT96.","Disable vectorized reads for these files to use the non-vectorized path.","Add the missing Mode case to TimestampInt96Reader.nextDictEncodedVal if it should be supported."],"exampleFix":"// before\nthrow new UnsupportedOperationException(\"Unsupported mode for timestamp int96 reader: \" + mode);\n// after\ncase RLE_DICTIONARY: // add the missing mode\n  decodeWithRleDictionary(vector, idx, reader, dict, numValues, holder, typeWidth);\n  break;\ndefault:\n  throw new UnsupportedOperationException(\"Unsupported mode for timestamp int96 reader: \" + mode);","handlingStrategy":"try-catch","validationCode":"// pre-check encoding before vectorized INT96 dictionary decode\nboolean isInt96 = desc.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.INT96;\nboolean dictEncoded = pageEncoding != null && pageEncoding.isDictionaryEncoded();\nif (isInt96 && dictEncoded) { disableVectorization = true; }","typeGuard":null,"tryCatchPattern":"try {\n  reader.nextDictEncodedVal(vector, idx, dictReader, dict, mode, numValues, holder, typeWidth);\n} catch (UnsupportedOperationException e) {\n  throw new IllegalArgumentException(\"INT96 dict decode mode unsupported: \" + mode, e);\n}","preventionTips":["Convert INT96 timestamps to INT64 logical timestamps during ingestion/compaction.","Disable vectorized reads for legacy INT96 datasets.","Keep custom decode modes in sync with TimestampInt96Reader switch cases.","Test with representative legacy files before enabling vectorization fleet-wide."],"tags":["parquet","int96","timestamp","dictionary-encoding"],"backgroundTag":"unsupported-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}