GitHub user kiszk opened a pull request:
https://github.com/apache/spark/pull/19598
[SPARK-22378]
## What changes were proposed in this pull request?
This PR eliminates redundant null check in generated code for extracting an
element from complex types. Since these code generation does not take care of
`nullable` in `DataType` such as `ArrayType`, the generated code always has
`isNullAt(index)`.
This PR avoids to generate `isNullAt(index)` if `nullable` is false in
`DataType`.
## How was this patch tested?
Added test cases into `ComplexTypeSuite`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kiszk/spark SPARK-22378
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19598.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 #19598
----
commit 6057309a0cc98d0b480d468107fadd1b2a44a1c0
Author: Kazuaki Ishizaki <[email protected]>
Date: 2017-10-28T16:53:14Z
initial commit
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]