{"record":{"id":"abd8d6cc37d670e1","repo":"apache/iceberg","slug":"not-an-long-column","errorCode":null,"errorMessage":"Not an long column","messagePattern":"Not an long column","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"parquet/src/main/java/org/apache/iceberg/parquet/TripleWriter.java","lineNumber":61,"sourceCode":"\n  /**\n   * Write a triple.\n   *\n   * @param rl repetition level\n   * @param value the integer value\n   */\n  default void writeInteger(int rl, int value) {\n    throw new UnsupportedOperationException(\"Not an integer column\");\n  }\n\n  /**\n   * Write a triple.\n   *\n   * @param rl repetition level\n   * @param value the long value\n   */\n  default void writeLong(int rl, long value) {\n    throw new UnsupportedOperationException(\"Not an long column\");\n  }\n\n  /**\n   * Write a triple.\n   *\n   * @param rl repetition level\n   * @param value the float value\n   */\n  default void writeFloat(int rl, float value) {\n    throw new UnsupportedOperationException(\"Not an float column\");\n  }\n\n  /**\n   * Write a triple.\n   *\n   * @param rl repetition level\n   * @param value the double value\n   */","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/TripleWriter.java#L43-L79","documentation":"TripleWriter.writeLong's default body throws UnsupportedOperationException with a (typo'd) message 'Not an long column'. Only writers for INT64 Parquet columns override it; all other column writers keep the throwing default, so calling writeLong on a non-INT64 writer fails at runtime.","triggerScenarios":"Calling column.writeLong(rl, value) on a TripleWriter whose Parquet column is not INT64 (e.g. INT32, DOUBLE, BINARY).","commonSituations":"Writing Iceberg long or timestamp values through a writer for an int column; custom TripleWriter subclasses missing the writeLong override; schema evolution (int->long) not mirrored in writers.","solutions":["Verify the Parquet column physical type is INT64 before calling writeLong.","Override writeLong in custom TripleWriter implementations for INT64 columns.","Check the type mapping produced by TypeToMessageType for the field (timestamps must map to INT64 with a logical annotation)."],"exampleFix":"// before\nwriter.writeLong(rl, value); // column is INT32\n// after\nwriter.writeInteger(rl, (int) value); // or fix the schema so the column is INT64","handlingStrategy":"type-guard","validationCode":"boolean isInt64Column(ColumnDescriptor col) {\n  return col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.INT64;\n}","typeGuard":"if (col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.INT64) { writer.writeLong(rl, value); }","tryCatchPattern":null,"preventionTips":["Use writeLong only for INT64 columns (long, timestamp, timestamptz fields).","Verify type mapping after int->long schema evolution.","Assert expected physical types when constructing writers."],"tags":["parquet","unsupported-type","writer"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}