karuppuchamysuresh commented on PR #20072: URL: https://github.com/apache/datafusion/pull/20072#issuecomment-3824245175
Thanks for the review, @Jefffrey! I've addressed your feedback about
Decimal256 and reviewed the entire page for accuracy.
Changes Made
Added explicit documentation for Decimal256 in the Numeric Types table:
I've split the DECIMAL mapping into two separate table rows to make it
clear that both Decimal128 and Decimal256 are supported:
| `DECIMAL(precision, scale)` where precision ≤ 38 |
`Decimal128(precision, scale)` |
| `DECIMAL(precision, scale)` where precision > 38 |
`Decimal256(precision, scale)` |
The maximum supported precision for `DECIMAL` types is 76.
This is based on the implementation in
datafusion/sql/src/utils.rs:310-316, which uses:
- Decimal128 for precision ≤ 38 (DECIMAL128_MAX_PRECISION)
- Decimal256 for precision 39-76 (DECIMAL256_MAX_PRECISION)
The split into two rows makes it immediately visible to users that both
types are supported, rather than requiring them to read a note below the table.
Verification of Other Type Mappings
I also verified the accuracy of all other type mappings in the document:
✅ Numeric Types: All integer and float mappings are correct
✅ Date/Time Types: Verified against datafusion/sql/src/planner.rs:
- DATE → Date32 (line 711)
- TIME → Time64(Nanosecond) (lines 712-721)
- TIMESTAMP → Timestamp(Nanosecond, None) (lines 688-710)
- INTERVAL → Interval(MonthDayNano) (line 738)
✅ Binary Types: BYTEA → Binary (line 733)
✅ Boolean Types: BOOLEAN → Boolean (line 637)
✅ Character Types: Already updated in this PR to Utf8View
All mappings now accurately reflect the current implementation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
