joellubi commented on code in PR #43641:
URL: https://github.com/apache/arrow/pull/43641#discussion_r1713923759
##########
go/parquet/pqarrow/schema.go:
##########
@@ -406,6 +406,11 @@ func fieldToNode(name string, field arrow.Field, props
*parquet.WriterProperties
return nil, fmt.Errorf("%w: support for %s",
arrow.ErrNotImplemented, field.Type.ID())
}
+ if customLogicalType != nil {
+ logicalType = customLogicalType.Type
+ length = customLogicalType.Length
Review Comment:
The `length` here should come from the physical layout. The `LogicalType`
interface has method `IsApplicable(t parquet.Type, tlen int32) bool` that can
validate whether the underlying type is of the right size for the logical type.
In practice this means you shouldn't need to specify the length here at all.
The arrow types above that correspond to `FixedLenByteArray` should already be
setting `length` to the appropriate value.
That raises another point. If `schema.LogicalType` is actually the only
field that the new `LogicalType` struct needs to track, then we can skip
defining the new struct type and just use the `schema.LogicalType` interface
instead.
--
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]