GitHub user ueshin opened a pull request:

    https://github.com/apache/spark/pull/21830

    [SPARK-24878][SQL] Fix reverse function for array type of primitive type 
containing null.

    ## What changes were proposed in this pull request?
    
    If we use `reverse` function for array type of primitive type containing 
`null` and the child array is `UnsafeArrayData`, the function returns a wrong 
result because `UnsafeArrayData` doesn't define the behavior of re-assignment, 
especially we can't set a valid value after we set `null`.
    
    ## How was this patch tested?
    
    Added some tests.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ueshin/apache-spark 
issues/SPARK-24878/fix_reverse

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/21830.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21830
    
----
commit 91978e79dd64189e9dbef47d8e8e720a34982d9b
Author: Takuya UESHIN <ueshin@...>
Date:   2018-07-20T16:29:58Z

    Fix `reverse` function for array type.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to