This is an automated email from the ASF dual-hosted git repository.

wenchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new bf42b891cf5 [MINOR][SQL] Improve the comments about null tracking for 
UnsafeRow
bf42b891cf5 is described below

commit bf42b891cf5afa45d133bec8cda0852b8d529540
Author: Jiaan Geng <[email protected]>
AuthorDate: Mon Aug 8 12:57:39 2022 +0800

    [MINOR][SQL] Improve the comments about null tracking for UnsafeRow
    
    ### What changes were proposed in this pull request?
    This PR expect to improve the comments about null tracking for `UnsafeRow`.
    The old comment of `UnsafeRow` have confused text `[null bit set]`.
    In fact, the portion is a lot of bit or bit array which does't always be 
null.
    On the other hand, it tell users nothing. we need the information more 
clear.
    
    ### Why are the changes needed?
    Improve the comments about null tracking for `UnsafeRow`.
    
    ### Does this PR introduce _any_ user-facing change?
    'No'.
    Just update comments.
    
    ### How was this patch tested?
    N/A
    
    Closes #37340 from beliefer/UnsafeRow_comment.
    
    Authored-by: Jiaan Geng <[email protected]>
    Signed-off-by: Wenchen Fan <[email protected]>
---
 .../java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java
 
b/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java
index 476201c9a8d..83ac80bf4ba 100644
--- 
a/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java
+++ 
b/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java
@@ -46,10 +46,9 @@ import static 
org.apache.spark.unsafe.Platform.BYTE_ARRAY_OFFSET;
 /**
  * An Unsafe implementation of Row which is backed by raw memory instead of 
Java objects.
  *
- * Each tuple has three parts: [null bit set] [values] [variable length 
portion]
+ * Each tuple has three parts: [null-tracking bit set] [values] [variable 
length portion]
  *
- * The bit set is used for null tracking and is aligned to 8-byte word 
boundaries.  It stores
- * one bit per field.
+ * The null-tracking bit set is aligned to 8-byte word boundaries. It stores 
one bit per field.
  *
  * In the `values` region, we store one 8-byte word per field. For fields that 
hold fixed-length
  * primitive types, such as long, double, or int, we store the value directly 
in the word. For


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

Reply via email to