benibus commented on code in PR #35690:
URL: https://github.com/apache/arrow/pull/35690#discussion_r1199347189


##########
go/parquet/pqarrow/encode_arrow.go:
##########
@@ -246,6 +246,10 @@ type binary64arr interface {
 }
 
 func writeDenseArrow(ctx *arrowWriteContext, cw file.ColumnChunkWriter, 
leafArr arrow.Array, defLevels, repLevels []int16, maybeParentNulls bool) (err 
error) {
+       if leafArr.Len() == 0 {

Review Comment:
   Can't comment on it directly since it's not in the diff, but it's not 
immediately obvious to me why we'd handle this case differently: 
https://github.com/apache/arrow/blob/c8363fa209fed4dfa30a0eee70283d62fc6f1627/go/parquet/pqarrow/encode_arrow.go#L270-L275
   
   Also, it seems like that branch may never be taken now? Unless it's only 
there to cover an edge-case where `leafArr` was reassigned to an empty storage 
array after the initial `Len() == 0` check: 
https://github.com/apache/arrow/blob/c8363fa209fed4dfa30a0eee70283d62fc6f1627/go/parquet/pqarrow/encode_arrow.go#L253-L257



-- 
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]

Reply via email to