{"record":{"id":"2435bfe1d4c77209","repo":"apache/iceberg","slug":"not-an-float-column","errorCode":null,"errorMessage":"Not an float column","messagePattern":"Not an float column","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"parquet/src/main/java/org/apache/iceberg/parquet/TripleWriter.java","lineNumber":71,"sourceCode":"\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   */\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   */","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/parquet/src/main/java/org/apache/iceberg/parquet/TripleWriter.java#L53-L89","documentation":"TripleWriter.writeFloat's default implementation throws 'Not an float column'. It exists so only FLOAT-typed Parquet column writers override it; any other writer retains the throwing default and fails when writeFloat is invoked.","triggerScenarios":"Calling column.writeFloat(rl, value) on a TripleWriter whose Parquet column is not FLOAT (e.g. DOUBLE, INT32).","commonSituations":"Writing Iceberg float values into a double column writer (or vice versa); custom writers missing the override; confusion between Java float/double and Parquet FLOAT/DOUBLE types.","solutions":["Confirm the column's physical type is FLOAT before calling writeFloat; use writeDouble for DOUBLE columns.","Override writeFloat in custom TripleWriter implementations for FLOAT columns.","Reconcile the Iceberg schema (float vs double) with the Parquet schema so writer dispatch matches."],"exampleFix":"// before\nwriter.writeFloat(rl, value); // column is DOUBLE\n// after\nwriter.writeDouble(rl, (double) value);","handlingStrategy":"type-guard","validationCode":"boolean isFloatColumn(ColumnDescriptor col) {\n  return col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.FLOAT;\n}","typeGuard":"if (col.getPrimitiveType().getPrimitiveTypeName() == PrimitiveTypeName.FLOAT) { writer.writeFloat(rl, value); }","tryCatchPattern":null,"preventionTips":["Distinguish FLOAT vs DOUBLE in Java float/double handling — never assume one writer serves both.","Dispatch writers via a switch on PrimitiveTypeName.","Test float and double columns separately."],"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"}