zeroshade commented on code in PR #984:
URL: https://github.com/apache/iceberg-go/pull/984#discussion_r3203203273
##########
types.go:
##########
@@ -777,6 +824,145 @@ func (UnknownType) primitive() {}
func (UnknownType) Type() string { return "unknown" }
func (UnknownType) String() string { return "unknown" }
+type EdgeAlgorithm string
+
+const (
+ EdgeAlgorithmSpherical EdgeAlgorithm = "spherical"
+ EdgeAlgorithmVincenty EdgeAlgorithm = "vincenty"
+ EdgeAlgorithmThomas EdgeAlgorithm = "thomas"
+ EdgeAlgorithmAndoyer EdgeAlgorithm = "andoyer"
+ EdgeAlgorithmKarney EdgeAlgorithm = "karney"
+)
Review Comment:
these exist in geoarrow/geoarrow-go, we should use the constants from there
instead of defining them here. See
https://github.com/geoarrow/geoarrow-go/blob/main/metadata.go
##########
exprs.go:
##########
@@ -450,6 +450,8 @@ func createBoundRef(field NestedField, acc accessor)
BoundReference {
return &boundRef[Decimal]{field: field, acc: acc}
case UUIDType:
return &boundRef[uuid.UUID]{field: field, acc: acc}
+ case GeographyType, GeometryType:
+ return &boundRef[[]byte]{field: field, acc: acc}
Review Comment:
should this be https://github.com/geoarrow/geoarrow-go/blob/main/wkb.go#L20
instead of `[]byte`?
##########
table/arrow_utils.go:
##########
@@ -630,6 +630,24 @@ func (c convertToArrow) VisitUnknown() arrow.Field {
}
}
+func (c convertToArrow) VisitGeometry(iceberg.GeometryType) arrow.Field {
+ // Passthrough binary for now, adding geoarrow-go support later
+ if c.useLargeTypes {
+ return arrow.Field{Type: arrow.BinaryTypes.LargeBinary}
+ }
+
+ return arrow.Field{Type: arrow.BinaryTypes.Binary}
+}
+
+func (c convertToArrow) VisitGeography(iceberg.GeographyType) arrow.Field {
+ // Passthrough binary for now, adding geoarrow-go support later
+ if c.useLargeTypes {
+ return arrow.Field{Type: arrow.BinaryTypes.LargeBinary}
+ }
+
+ return arrow.Field{Type: arrow.BinaryTypes.Binary}
Review Comment:
same point as above. why not just use
https://github.com/geoarrow/geoarrow-go/blob/main/wkb.go#L20 right now instead
of the passthrough?
##########
table/arrow_utils.go:
##########
@@ -630,6 +630,24 @@ func (c convertToArrow) VisitUnknown() arrow.Field {
}
}
+func (c convertToArrow) VisitGeometry(iceberg.GeometryType) arrow.Field {
Review Comment:
I don't see why we don't just use
https://github.com/geoarrow/geoarrow-go/blob/main/wkb.go#L15 off the bat right
now instead of using binary/large binary as the intermediate.
https://github.com/geoarrow/geoarrow-go/blob/main/wkb.go#L84 can be used for
the large type case
--
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]