alamb commented on code in PR #8528:
URL: https://github.com/apache/arrow-rs/pull/8528#discussion_r2395872299
##########
parquet/src/basic.rs:
##########
@@ -456,9 +457,10 @@ impl<'a, R: ThriftCompactInputProtocol<'a>> ReadThrift<'a,
R> for LogicalType {
}
18 => {
let val = GeographyType::read_thrift(&mut *prot)?;
+ let algorithm = val.algorithm.unwrap_or_default();
Review Comment:
> Ah, guess I should have read the spec 😅. I'll leave this as is then.
@alamb do you have an opinion here? (relevent section of the spec is
[here](https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#geography)).
I agree this seems pretty clear cut:
> If unset, the algorithm defaults to SPHERICAL.
Maybe we could change this to explicitly name SPHERICAL and reference the
spec, something like
```suggestion
let algorithm = val.algorithm
// unset algorithm means spherical, per the spec:
//
https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#geography
.unwrap_or(EdgeInterpolationAlgorithm::Spherical)
```
--
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]