zeroshade commented on a change in pull request #12158:
URL: https://github.com/apache/arrow/pull/12158#discussion_r800700420



##########
File path: go/arrow/array/data.go
##########
@@ -63,6 +64,16 @@ func NewData(dtype arrow.DataType, length int, buffers 
[]*memory.Buffer, childDa
        }
 }
 
+// NewDataWithDictionary creates a new data object, but also sets the provided 
dictionary into the data if it's not nil
+func NewDataWithDictionary(dtype arrow.DataType, length int, buffers 
[]*memory.Buffer, childData []arrow.ArrayData, nulls, offset int, dict *Data) 
*Data {
+       data := NewData(dtype, length, buffers, childData, nulls, offset)

Review comment:
       Is it guaranteed that `childData` should always be empty for Dictionary 
arrays? Based on the spec, can you have a dictionary of lists where the values 
of the dictionary are themselves list arrays? If it's guaranteed to always be 
empty, I'll just remove it from the argument list here.




-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to