problem
iceberg-rust serializes the decimal type as decimal(9,2) (no space after comma). both java and python serialize as decimal(9, 2) (with space). the iceberg spec documents the type as decimal(P, S).
strict downstream parsers that expect the canonical form reject the spaceless variant.
current behavior
// crates/iceberg/src/spec/datatypes.rs
write!(f, "decimal({precision},{scale})")
produces: "decimal(9,2)"
expected behavior
write!(f, "decimal({precision}, {scale})")
produces: "decimal(9, 2)" — matching java (String.format("decimal(%d, %d)", ...)) and python (f"decimal({self.precision}, {self.scale})").
impact
- all existing parsers (java, python, rust) handle both forms via
.trim() — no breaking change
- aligns iceberg-rust output with the canonical form used by the other two major implementations
- one-character fix in the format string
notes
the deserializer already handles both formats correctly (trims whitespace after comma split). this is purely about output alignment.
problem
iceberg-rust serializes the decimal type as
decimal(9,2)(no space after comma). both java and python serialize asdecimal(9, 2)(with space). the iceberg spec documents the type asdecimal(P, S).strict downstream parsers that expect the canonical form reject the spaceless variant.
current behavior
produces:
"decimal(9,2)"expected behavior
produces:
"decimal(9, 2)"— matching java (String.format("decimal(%d, %d)", ...)) and python (f"decimal({self.precision}, {self.scale})").impact
.trim()— no breaking changenotes
the deserializer already handles both formats correctly (trims whitespace after comma split). this is purely about output alignment.