C-Loftus commented on issue #1230:
URL: https://github.com/apache/iceberg-go/issues/1230#issuecomment-4779964616
@happydave1 / @laskoviymishka I've started working on this and have 2
questions on this if you don't mind
> To fix this, the write path should resolve projjson:<property-name>
against table properties
Do you have a recommendation for how to solve this other than adding an
extra arg to `VisitGeometry`? I tried to pass the table properties but then I
get the error below since it doesnt match the `SchemaVisitorPerPrimitiveType`
interface anymore. I wasn't clear if I can modify the interface or if it should
remain unchanged. To look up the definition in the table properties, I think I
need to extend `VisitGeometry` in some capacity.
```go
func (c convertToArrow) VisitGeometry(g iceberg.GeometryType,
tableProperties *iceberg.Properties) arrow.Field {
```
```
cannot use convertToArrow{} (value of struct type convertToArrow) as
iceberg.SchemaVisitorPerPrimitiveType[arrow.Field] value in variable
declaration: convertToArrow does not implement
iceberg.SchemaVisitorPerPrimitiveType[arrow.Field] (wrong type for method
VisitGeography)
have VisitGeography(iceberg.GeographyType, *iceberg.Properties)
arrow.Field
want VisitGeography(iceberg.GeographyType) arrow.Field
```
> Instead, the full PROJJSON definition belongs in a table property and the
schema CRS should reference it as projjson:my-property-name.
Is it correct that this is the responsibility of the client application
calling iceberg-go to populate the desired PROJJSON definitions into the table
metadata themselves? Put another way, my understanding is that I shouldn't add
any logic in my PR to default to add any PROJJSON definitions to the table upon
creation. Wanted to confirm that.
Thank you!
--
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]