Spec: Align the decimal type string with the canonical form - #18145
Conversation
apache#16798 added the sentence that the type strings in Appendix C's table are the canonical serialized forms, but left the decimal row itself unchanged: the template still omitted the separator space and the examples showed both spacings. Java's DecimalType.toString() writes the spaced form, as does PyIceberg, and apache#16799 already made this change for geography.
|
@kevinjqliu you wrote #16798 and #16799 on the same day, so this is squarely your call: the decimal row is the one row that #16798's new sentence describes but its diff didn't reach, and #16799 shows what the complete version looks like. One line in the type-string table, no change to reader tolerance, CI is green. Would you take a look? |
|
Thank you @moomindani! This makes sense, let's wait for @kevinjqliu's review |
kevinjqliu
left a comment
There was a problem hiding this comment.
LGTM!
This aligns with the same change for geography type in
https://github.com/apache/iceberg/pull/16799/changes#diff-36347a47c3bf67ea2ef6309ea96201814032d21bb5f162dfae4045508c15588aR1688
Since this is minor formatting fix, we do not need a formal vote
|
Thanks for the catch @moomindani and thanks for the review @uros-b |
Summary
Follow-up to #16798, applying to
decimalwhat #16799 did forgeography.#16798 added the sentence that the type strings in this table are the canonical serialized forms, and its description gives the canonical decimal form as
decimal(P, S), but it left the decimal row itself unchanged: the template still reads"decimal(<P>,<S>)"and the examples still show both spacings. This updates the row to match — one template and one example, both spaced.Java writes that form:
SchemaParserwritestype.toString()andDecimalType.toString()formatsdecimal(%d, %d). PyIceberg emits the same. Reader tolerance for the unspaced form is unchanged — that is stated by the sentence #16798 added.Noticed while working on conformance fixtures for apache/iceberg-verification, where a fixture has to name one canonical form per type string.
Testing
git diff --check