{"record":{"id":"a0258268b4def339","repo":"apache/iceberg","slug":"creating-s-from-a-fixedsizebinaryvector-is-not-su","errorCode":null,"errorMessage":"Creating %s from a FixedSizeBinaryVector is not supported","messagePattern":"Creating (.+?) from a FixedSizeBinaryVector is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"arrow/src/main/java/org/apache/iceberg/arrow/vectorized/GenericArrowVectorAccessorFactory.java","lineNumber":819,"sourceCode":"    /** Create a decimal from the given {@link BigDecimal} value, precision and scale. */\n    DecimalT ofBigDecimal(BigDecimal value, int precision, int scale);\n  }\n\n  /**\n   * Create a UTF8 String value of type {@code Utf8StringT} from arrow vector value.\n   *\n   * @param <Utf8StringT> A concrete type that can represent a UTF8 string.\n   */\n  protected interface StringFactory<Utf8StringT> {\n    /** Class of concrete UTF8 String type. */\n    Class<Utf8StringT> getGenericClass();\n\n    /** Create a UTF8 String from the row value in the arrow vector. */\n    Utf8StringT ofRow(VarCharVector vector, int rowId);\n\n    /** Create a UTF8 String from the row value in the FixedSizeBinaryVector vector. */\n    default Utf8StringT ofRow(FixedSizeBinaryVector vector, int rowId) {\n      throw new UnsupportedOperationException(\n          String.format(\n              \"Creating %s from a FixedSizeBinaryVector is not supported\",\n              getGenericClass().getSimpleName()));\n    }\n\n    /** Create a UTF8 String from the row value in the Dictionary. */\n    default Utf8StringT ofRow(IntVector offsetVector, Dictionary dictionary, int rowId) {\n      throw new UnsupportedOperationException(\n          String.format(\n              \"Creating %s from a Dictionary is not supported\", getGenericClass().getSimpleName()));\n    }\n\n    /** Create a UTF8 String from the byte array. */\n    Utf8StringT ofBytes(byte[] bytes);\n\n    /** Create a UTF8 String from the byte buffer. */\n    Utf8StringT ofByteBuffer(ByteBuffer byteBuffer);\n  }","sourceCodeStart":801,"sourceCodeEnd":837,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/GenericArrowVectorAccessorFactory.java#L801-L837","documentation":"The StringFactory/Utf8 factory interface provides a default ofRow(FixedSizeBinaryVector, int) that throws UnsupportedOperationException because converting a fixed-size binary buffer to the generic UTF8 string type is not implemented by default. Concrete factory subclasses (e.g. Spark's) may override it; the default contract forbids it.","triggerScenarios":"A FixedSizeBinaryVector-backed column (e.g. decimal or fixed_len_byte_array stored as FixedSizeBinary) reaches a string accessor path whose factory did not override ofRow(FixedSizeBinaryVector, int); getVectorAccessor routes fixed-size vectors to this default when the factory lacks the override.","commonSituations":"Reading fixed_len_byte_array string/binary columns with vectorized reads in an engine whose string factory was not extended; mixing engine versions where the factory override is missing.","solutions":["Disable vectorized reads (parquet vectorization off) for tables containing fixed-size binary string data","Upgrade to an Iceberg version where the engine's StringFactory implements ofRow(FixedSizeBinaryVector, int)","Catch UnsupportedOperationException and fall back to the generic Parquet reader for such files"],"exampleFix":"// before\n// default factory used for FixedSizeBinary string column -> throws\n// after\ncollection.config().set(TableProperties.PARQUET_VECTORIZATION_ENABLED, \"false\");","handlingStrategy":"fallback","validationCode":"if (columnPhysicalType.equals(\"FIXED_LEN_BYTE_ARRAY\") && expectsString) {\n  // disable vectorization or ensure factory overrides ofRow(FixedSizeBinaryVector)\n}","typeGuard":"boolean stringFactorySupportsFixedSize(StringFactory<?> f) {\n  try { f.getClass().getMethod(\"ofRow\", FixedSizeBinaryVector.class, int.class); return true; }\n  catch (NoSuchMethodException e) { return false; }\n}","tryCatchPattern":"try {\n  return vectorizedRead();\n} catch (UnsupportedOperationException e) {\n  return genericRead();\n}","preventionTips":["Avoid fixed_len_byte_array string columns when possible","Use an engine integration whose StringFactory overrides fixed-size ofRow","Fall back to generic reads for such files"],"tags":["arrow","vectorized-reads","string-factory"],"backgroundTag":"unsupported-operation","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"}