{"record":{"id":"0dc61c86019668df","repo":"apache/iceberg","slug":"readinteger-is-not-supported","errorCode":null,"errorMessage":"readInteger is not supported","messagePattern":"readInteger is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedValuesReader.java","lineNumber":56,"sourceCode":"\n  /** Read a single boolean */\n  default boolean readBoolean() {\n    throw new UnsupportedOperationException(\"readBoolean is not supported\");\n  }\n\n  /** Read a single byte */\n  default byte readByte() {\n    throw new UnsupportedOperationException(\"readByte is not supported\");\n  }\n\n  /** Read a single short */\n  default short readShort() {\n    throw new UnsupportedOperationException(\"readShort is not supported\");\n  }\n\n  /** Read a single integer */\n  default int readInteger() {\n    throw new UnsupportedOperationException(\"readInteger is not supported\");\n  }\n\n  /** Read a single long */\n  default long readLong() {\n    throw new UnsupportedOperationException(\"readLong is not supported\");\n  }\n\n  /** Read a single float */\n  default float readFloat() {\n    throw new UnsupportedOperationException(\"readFloat is not supported\");\n  }\n\n  /** Read a single double */\n  default double readDouble() {\n    throw new UnsupportedOperationException(\"readDouble is not supported\");\n  }\n\n  /**","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedValuesReader.java#L38-L74","documentation":"VectorizedValuesReader.readInteger is a default interface method that throws UnsupportedOperationException. Integer reads must be provided by the concrete values reader; calling it on an implementation that does not override it (e.g. one designed only for dictionary-id lookup or specific types) fails.","triggerScenarios":"Calling readInteger() from a nextVal or len path on a VectorizedValuesReader that does not implement it — e.g. reading an INT32 value or a binary length prefix through a reader that never overrode readInteger.","commonSituations":"Vectorized decoding of INT32 columns (including string/binary length prefixes) when the active reader implementation only supports other types (e.g. dictionary lookup readers); custom reader subclasses.","solutions":["Ensure the column's reader is a stream-backed implementation overriding readInteger.","For dictionary-encoded columns use the dictionary read methods (readIntegerDictionaryId / nextDictEncodedVal) instead of the plain path.","Override readInteger in custom VectorizedValuesReader implementations."],"exampleFix":"// before\nint v = valuesReader.readInteger(); // throws on dictionary-id reader\n// after\nint v = isDictEncoded ? valuesReader.readIntegerDictionaryId() : valuesReader.readInteger();","handlingStrategy":"validation","validationCode":"// ensure the reader supports plain INT32 reads before calling\nboolean isDictOnly = valuesReader instanceof VectorizedDictionaryEncodedParquetValuesReader;\nif (isDictOnly && !dictEncodedPage) { disableVectorization = true; }","typeGuard":null,"tryCatchPattern":"try {\n  int len = valuesReader.readInteger();\n} catch (UnsupportedOperationException e) {\n  // reader does not support plain integer reads — switch path\n  decodeDictionaryEncoded();\n}","preventionTips":["Use dictionary read methods for dictionary-encoded pages; plain reads only on stream-backed readers.","Never call readInteger on readers that only implement a subset (e.g. dictionary-id readers).","Override readInteger in any custom VectorizedValuesReader implementation.","Test string/binary length-prefix reads through the exact reader used in production."],"tags":["parquet","vectorized-reads","int32"],"backgroundTag":"method-not-implemented","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}