{"record":{"id":"ad98b8464aa4d6f1","repo":"apache/iceberg","slug":"not-an-double-column","errorCode":null,"errorMessage":"Not an double column","messagePattern":"Not an double column","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"parquet/src/main/java/org/apache/iceberg/parquet/TripleWriter.java","lineNumber":81,"sourceCode":"\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   */\n  default void writeDouble(int rl, double value) {\n    throw new UnsupportedOperationException(\"Not an double column\");\n  }\n\n  /**\n   * Write a triple.\n   *\n   * @param rl repetition level\n   * @param value the binary value\n   */\n  default void writeBinary(int rl, Binary value) {\n    throw new UnsupportedOperationException(\"Not an binary column\");\n  }\n\n  /**\n   * Write a triple for a null value.\n   *\n   * @param rl repetition level\n   * @param dl definition level\n   */","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/TripleWriter.java#L63-L99","documentation":"TripleWriter.writeDouble's default implementation throws 'Not an double column'. Only writers for DOUBLE-typed Parquet columns override it; invoking it on any other column's writer reaches the throwing default.","triggerScenarios":"Calling column.writeDouble(rl, value) on a TripleWriter whose Parquet column is not DOUBLE (e.g. FLOAT, INT64).","commonSituations":"Writing Iceberg double values through a float/int column writer; custom TripleWriter subclasses lacking the writeDouble override; schema drift between Iceberg and Parquet schemas.","solutions":["Verify the column's physical type is DOUBLE before calling writeDouble.","Override writeDouble in custom TripleWriter implementations for DOUBLE columns.","Regenerate writers after schema type changes so dispatch matches the physical type."],"exampleFix":"// before\nwriter.writeDouble(rl, value); // column is FLOAT\n// after\nwriter.writeFloat(rl, (float) value); // or change the schema column to double","handlingStrategy":"type-guard","validationCode":"boolean isDoubleColumn(ColumnDescriptor col) {\n  return col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.DOUBLE;\n}","typeGuard":"if (col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.DOUBLE) { writer.writeDouble(rl, value); }","tryCatchPattern":null,"preventionTips":["Call writeDouble only on DOUBLE-typed columns.","Keep Iceberg schema and Parquet schema types aligned after evolution.","Add per-type writer dispatch unit tests."],"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-23T08:17:48.524Z"}