tustvold commented on code in PR #2691:
URL: https://github.com/apache/arrow-rs/pull/2691#discussion_r966217556
##########
arrow/src/record_batch.rs:
##########
@@ -199,6 +199,16 @@ impl RecordBatch {
/// Projects the schema onto the specified columns
pub fn project(&self, indices: &[usize]) -> Result<RecordBatch> {
+ if indices.is_empty() {
+ return RecordBatch::try_new_with_options(
Review Comment:
Why not just always call try_new_with_options?
--
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]