feat: expose base type names and retain large numeric lengths - #2647
Merged
manticore-projects merged 2 commits intoSep 20, 2026
Merged
manticore-projects merged 2 commits into
manticore-projects merged 2 commits into
Conversation
Contributor
|
Please resolve conflicts. |
Contributor
Author
|
@manticore-projects Thanks for flagging this!
Merged the latest The full Gradle Commit: a65e84cd |
Contributor
|
Thank you very much and sorry for the extra round. I wished GitHub would support semantic, AST based merges. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MySQL accepts
BLOB(4294967295), but parsing it overflows an Integer. The valid numeric length2147483647is also incorrectly rendered asMAX. Separately, consumers reading a type name must strip parameters from the legacygetDataType()result, such asdecimal (10, 2).Use exact numeric precision metadata and a shared parameter factory that distinguishes numeric lengths from the MAX keyword. Add
getNumericPrecision()andisMaxPrecision()while retaining the existing Integer accessor and primitive-constructor sentinel behavior. The Integer accessor returns null for numeric lengths outside its range.getBaseTypeName()provides a shared, quote-aware view of the unparameterized name while preserving legacy spelling and rendering.Validation: Gradle
checkpassed (7512 tests, 0 failures, 0 errors, 25 skipped), including grammar and static checks. Tests cover MySQL BLOB/TEXT family boundaries, the Integer boundary, MAX, metadata edits, PostgreSQL numeric/temporal/array types, quoted names, fragments, casts and DDL round trips. The reflection-based test printer compares numeric values without reflecting into encapsulated JDK fields.All 44 valid SQL fixtures and both rendered forms execute on MySQL 8.4.11 or PostgreSQL 18.6 (132 executions). An additional 30-case MySQL BLOB/TEXT audit distinguishes accepted lengths from negative syntax and server range errors. Database-specific semantic limits remain the database's responsibility; syntactically numeric lengths are retained exactly.
Syntax references: MySQL string types, PostgreSQL numeric types.