wecharyu opened a new pull request, #60341:
URL: https://github.com/apache/spark/pull/60341

   ### What changes were proposed in this pull request?
   Enable null handling in `ColumnarArray.get()` by passing `true` for 
handleNull to `SpecializedGettersReader.read()`, consistent with 
`UnsafeArrayData.get()` and `UnsafeRow.get()`.
   
   ### Why are the changes needed?
   `ColumnarArray` was the only caller disabling null handling. Consequently, 
`get()` could return an underlying primitive value for an element marked as 
null.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. `ColumnarArray.get()` now returns null for null elements instead of 
their underlying stored values.
   
   
   ### How was this patch tested?
   Added a regression test in `ColumnVectorSuite` covering on-heap and off-heap 
vectors. The test fails before the fix and passes with it.
   ```bash
   build/sbt 'sql/testOnly 
org.apache.spark.sql.execution.vectorized.ColumnVectorSuite -- -z 
"ColumnarArray.get returns null for null elements"'
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Generated-by: Codex (GPT-6)
   


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