Skip to content

Spec: Align the decimal type string with the canonical form - #18145

Open
moomindani wants to merge 1 commit into
apache:mainfrom
moomindani:moomindani/spec-decimal-canonical
Open

moomindani wants to merge 1 commit into
apache:mainfrom
moomindani:moomindani/spec-decimal-canonical

Conversation

@moomindani

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #16798, applying to decimal what #16799 did for geography.

#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: SchemaParser writes type.toString() and DecimalType.toString() formats decimal(%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

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.
@github-actions github-actions Bot added the Specification Issues that may introduce spec changes. label Sep 16, 2026
@moomindani

Copy link
Copy Markdown
Contributor Author

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Specification Issues that may introduce spec changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant