moomindani commented on PR #3530:
URL: https://github.com/apache/iceberg-python/pull/3530#issuecomment-5708892846

   Thanks for reopening, @geruh.
   
   Before I touch anything, I'd like to agree on the split so this PR stays 
small.
   
   **In this PR** — align the read side with Java for all four patterns, plus 
anchoring:
   
   - `DECIMAL_REGEX`: whitespace (already here) and `$`, so `decimal(9,2)foo` 
stops parsing
   - `ParseNumberFromBrackets` (fixed): accept `fixed[ 16 ]`
   - `GEOMETRY_REGEX` / `GEOGRAPHY_REGEX`: accept an unquoted CRS. That is the 
form in the spec's own example and the only form Java writes (`Types.java:631`, 
`String.format("%s(%s)", NAME, crs())`), and today we raise a `ValidationError` 
on it.
   
   **As a follow-up** — what we emit. `str(GeometryType("srid:4326"))` gives 
`geometry('srid:4326')`, and Java's pattern captures the quotes into the CRS 
instead of rejecting them, so it reads the CRS as `'srid:4326'`. Dropping our 
quotes fixes that direction too, but it changes the type strings written into 
metadata, so I think it belongs in its own PR rather than riding along here.
   
   Does that split look right to you? @sungwy if you'd rather not spend more 
time on this, I'm happy to open a successor PR that keeps your commit and 
credits you — whichever you prefer.


-- 
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]

Reply via email to