chriscasola commented on a change in pull request #11832:
URL: https://github.com/apache/arrow/pull/11832#discussion_r780300956



##########
File path: go/arrow/array.go
##########
@@ -0,0 +1,71 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package arrow
+
+import (
+       "encoding/json"
+
+       "github.com/apache/arrow/go/v7/arrow/memory"
+)
+
+type ArrayData interface {

Review comment:
       Can you add a comment explaining what this interface is and when to use 
it?

##########
File path: go/arrow/array.go
##########
@@ -0,0 +1,71 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package arrow
+
+import (
+       "encoding/json"
+
+       "github.com/apache/arrow/go/v7/arrow/memory"
+)
+
+type ArrayData interface {
+       Retain()
+       Release()
+       DataType() DataType
+       NullN() int
+       Len() int
+       Offset() int
+       Buffers() []*memory.Buffer
+       Children() []ArrayData

Review comment:
       Can you comment what `Children()` is?

##########
File path: go/arrow/table.go
##########
@@ -0,0 +1,140 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package arrow
+
+import (
+       "sync/atomic"
+
+       "github.com/apache/arrow/go/v7/arrow/internal/debug"
+)
+
+// Table represents a logical sequence of chunked arrays.
+type Table interface {
+       Schema() *Schema
+       NumRows() int64
+       NumCols() int64
+       Column(i int) *Column
+
+       Retain()
+       Release()
+}
+
+// Column is an immutable column data structure consisting of
+// a field (type metadata) and a chunked data array.

Review comment:
       Is it worth describing how to cast to a typed column?

##########
File path: go/arrow/array/array.go
##########
@@ -17,51 +17,61 @@
 package array
 
 import (
-       "encoding/json"
        "sync/atomic"
 
        "github.com/apache/arrow/go/v7/arrow"
        "github.com/apache/arrow/go/v7/arrow/bitutil"
        "github.com/apache/arrow/go/v7/arrow/internal/debug"
 )
 
-// A type which satisfies array.Interface represents an immutable sequence of 
values.
-type Interface interface {
-       json.Marshaler
+// Interface aliases arrow.Array so that existing users don't get broken by
+// the migration to arrow.Array.
+//
+// Deprecated: This alias will be removed in v8
+type Interface = arrow.Array
 
-       // DataType returns the type metadata for this instance.
-       DataType() arrow.DataType
+type arraymarshal interface {
+       arrow.Array
 
-       // NullN returns the number of null values in the array.
-       NullN() int
+       getOneForMarshal(i int) interface{}
+}
 
-       // NullBitmapBytes returns a byte slice of the validity bitmap.
-       NullBitmapBytes() []byte
+// // A type which satisfies array.Interface represents an immutable sequence 
of values.
+// type Interface interface {

Review comment:
       Did you mean to leave this commented out interface?

##########
File path: go/arrow/record.go
##########
@@ -0,0 +1,45 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package arrow
+
+import "encoding/json"
+
+// Record is a collection of equal-length arrays
+// matching a particular Schema.

Review comment:
       Might be worth explaining how Record relates to Table. Maybe "A 
collection of Records make up a Table"?




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