laskoviymishka opened a new issue, #1231:
URL: https://github.com/apache/iceberg-go/issues/1231
Follow-up to #1138.
The Arrow→Iceberg CRS parsing in `geoArrowCRSToIcebergCRS` leans on a
`len(crs) <= 32` length check in the string-CRS `default` branch, which accepts
arbitrary short strings and rejects long-but-valid ones. A few things worth
tightening up:
- Replace the length heuristic with form-based matching — pass
`authority:code`-shaped strings through regardless of length (the
`authorityCodeCRS` regex already used on the write side works for this), and
reject other forms with a specific error.
- Reject projjson-typed *string* CRS on read. Right now a `CRSTypePROJJSON`
string slips through the same `default` branch and is accepted silently, even
though the write path rejects projjson.
- Give the WKT2:2019 case a consistent "not supported" message whether or
not `crs_type` is set. Today a bare WKT2 string falls into the length branch
and errors with "crs length too long", which is misleading.
- The JSON-object branch returns the same `errors.New("unsupported CRS")`
from six different failure points. Putting the offending member into the
message (or wrapping a sentinel) would make a parse failure tell you what was
actually wrong.
None of this is on the common path, so it's a robustness + diagnostics
cleanup rather than a correctness fix — good first issue territory.
--
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]