You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Mandukhai-Alimaa (via GitHub)" <gi...@apache.org> on 2025/08/11 13:29:59 UTC

[PR] refactor(arrow): rename Record to RecordBatch and add deprecated alias [arrow-go]

Mandukhai-Alimaa opened a new pull request, #466:
URL: https://github.com/apache/arrow-go/pull/466

   ### Rationale for this change
   
   Rename the Record interface to RecordBatch for clarity, since Record commonly means a single row but this type represents a batch of rows.
   
   
   ### What changes are included in this PR?
   
     - Renamed the Record interface to RecordBatch in /arrow/record.go
     - Updated interface method signatures to use RecordBatch in return types (SetColumn and NewSlice)
     - Added a deprecated type alias type Record = RecordBatch for backward compatibility to avoid breaking existing
     code and ease migration
     - Added proper Go deprecation annotation (// Deprecated:) to ensure tooling support
   
   
   ### Are these changes tested?
   
   All existing tests in ./arrow and ./arrow/array packages are passing.
   
   
   ### Are there any user-facing changes?
   
   Users can now use the semantically correct RecordBatch type name.
   
   


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


Re: [PR] refactor(arrow): rename Record to RecordBatch and add deprecated alias [arrow-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #466:
URL: https://github.com/apache/arrow-go/pull/466#discussion_r2270446235


##########
arrow/record.go:
##########
@@ -37,13 +37,18 @@ type Record interface {
 	Columns() []Array
 	Column(i int) Array
 	ColumnName(i int) string
-	SetColumn(i int, col Array) (Record, error)
+	SetColumn(i int, col Array) (RecordBatch, error)
 
 	// NewSlice constructs a zero-copy slice of the record with the indicated
 	// indices i and j, corresponding to array[i:j].
 	// The returned record must be Release()'d after use.
 	//
 	// NewSlice panics if the slice is outside the valid range of the record array.
 	// NewSlice panics if j < i.
-	NewSlice(i, j int64) Record
+	NewSlice(i, j int64) RecordBatch
 }
+
+// Deprecated: Record is deprecated, use RecordBatch instead.
+// Record represents a single row, but this type actually represents a batch of rows.
+// This alias is provided for backwards compatibility.

Review Comment:
   the convention for Go would be for the `deprecated` notice to be at the bottom. i.e.
   
   ```suggestion
   // Record as a term typically refers to a single row, but this type represents a batch of rows, known in Arrow parlance
   // as a RecordBatch. This alias is provided for backwards compatibility.
   //
   // Deprecated: This is deprecated to avoid the confusion of the terminology where Record refers to a single row,
   // use [RecordBatch] instead.
   ```
   



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


Re: [PR] refactor(arrow): rename Record to RecordBatch and add deprecated alias [arrow-go]

Posted by "Mandukhai-Alimaa (via GitHub)" <gi...@apache.org>.
Mandukhai-Alimaa commented on PR #466:
URL: https://github.com/apache/arrow-go/pull/466#issuecomment-3177637320

   @zeroshade. I updated the examples to use RecordBatch instead of Record. 
   
   For the incremental update, we can start with the non-critical leaf packages like internal utilities and specialized features and work our way up to the core packages like array and ipc. We can allow 3-4 days between each update to make sure previous changes did not break anything before moving to the next packages. Let me know what you think. Thanks


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


Re: [PR] refactor(arrow): rename Record to RecordBatch and add deprecated alias [arrow-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #466:
URL: https://github.com/apache/arrow-go/pull/466


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