You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/20 02:12:06 UTC

[GitHub] [arrow] emkornfield commented on a diff in pull request #12158: ARROW-3039: [Go] Add support for DictionaryArray

emkornfield commented on code in PR #12158:
URL: https://github.com/apache/arrow/pull/12158#discussion_r853667892


##########
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:
   the spec allows for arbitrary dictionary values (including lists).  I don't think this is super well supported in the general ecosystem though.



-- 
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-unsubscribe@arrow.apache.org

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