Dandandan opened a new pull request, #21356:
URL: https://github.com/apache/datafusion/pull/21356

   ## Which issue does this PR close?
   
   N/A - performance optimization
   
   ## Rationale for this change
   
   The `vectorized_append` methods in group value builders use per-row 
`push`/`append` loops in non-null paths, missing opportunities for batch 
operations and unchecked access.
   
   ## What changes are included in this PR?
   
   - **primitive.rs**: Replace `for &row in rows { push(arr.value(row)) }` with 
`extend(rows.iter().map(|&row| arr.value_unchecked(row)))` in non-null paths
   - **boolean.rs**: Replace `for &row in rows { append(arr.value(row)) }` with 
`unsafe { self.buffer.extend_trusted_len(...) }` using `value_unchecked` in 
non-null paths
   - **bytes_view.rs**: Replace `for &row` loop with 
`views.extend(rows.iter().map(...))` using split borrows and `value_unchecked`
   - **bytes.rs**: Switch to `value_unchecked` in the non-null path (loop kept 
due to per-row buffer overflow check)
   
   All `unsafe` usage is sound because null counts have already been checked 
before these code paths execute.
   
   ## Are these changes tested?
   
   Existing tests cover correctness of group value builders.
   
   ## Are there any user-facing changes?
   
   No - internal performance optimization only.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to