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

   A data point for the `GEOMETRY_REGEX` item, and two details that make it 
more than a quote class.
   
   We consume a published format-version 3 catalog whose geometry fields carry 
the unquoted CRS, because that is what the engine writing them emits. PyIceberg 
0.12.0 rejects the schema document:
   
   ```python
   from pyiceberg.schema import Schema
   
   Schema.model_validate_json(
       '{"type":"struct","schema-id":0,"fields":'
       
'[{"id":1,"name":"geometry","required":false,"type":"geometry(EPSG:25830)"}]}'
   )
   ```
   
   ```
   pyiceberg.exceptions.ValidationError: Could not parse geometry(EPSG:25830) 
into a GeometryType
   ```
   
   So the read side is not only a strictness difference against Java. It stops 
a Python client opening a table other engines read today.
   
   Two things I hit while checking the fix:
   
   **An unquoted CRS must stop at `,` and `)`.** Making the quotes optional 
with a permissive class lets the CRS swallow the separator, and 
`geography(srid:4326, spherical)` then parses with the algorithm dropped — 
silently, which is worse than the current error.
   
   **The capture group indices move.** Admitting a quoted-or-unquoted 
alternation adds groups, and the constructors read `match.group(1)` and 
`match.group(2)`. That indexing has to change with the pattern.
   
   @moomindani your split reads correctly from the outside: the read side here, 
the emit side separately, since dropping our quotes changes the type strings 
written into metadata.
   
   @sungwy the stale bot closed this once on 29 August and the clock restarts 
in about ten days.
   


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