zeroshade commented on code in PR #35580:
URL: https://github.com/apache/arrow/pull/35580#discussion_r1196704225


##########
go/arrow/array/table.go:
##########
@@ -257,6 +258,32 @@ func (tbl *simpleTable) Release() {
        }
 }
 
+func (tbl *simpleTable) String() string {
+       o := new(strings.Builder)
+       o.WriteString(tbl.Schema().String())
+       o.WriteString("\n")
+
+       for i := 0; i < int(tbl.NumCols()); i++ {
+               col := tbl.Column(i)
+               chunked := col.Data()
+               chunks := chunked.Chunks()
+               o_array := new(strings.Builder)
+               o_array.WriteString(col.Field().Name + ": [")

Review Comment:
   I'd prefer to avoid the extra builder because of the cost of creating a new 
builder for every column. It would be more readable to avoid the intermediate 
string builder (not to mention potentially large allocations as it ends up 
having to deep copy the string)



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