GitHub user viirya opened a pull request:

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

    [SPARK-13537][SQL] Fix readBytes in VectorizedPlainValuesReader

    JIRA: https://issues.apache.org/jira/browse/SPARK-13537
    
    ## What changes were proposed in this pull request?
    
    In readBytes of VectorizedPlainValuesReader, we use buffer[offset] to 
access bytes in buffer. It is incorrect because offset is added with 
Platform.BYTE_ARRAY_OFFSET when initialization. We should fix it.
    
    ## How was this patch tested?
    
    `ParquetHadoopFsRelationSuite` sometimes will be 
[failed](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52136/consoleFull)
 by this bug. After applying this, the test can be passed.
    
    The error exception:
    
        [info] ParquetHadoopFsRelationSuite:
        [info] - test all data types - StringType (440 milliseconds)
        [info] - test all data types - BinaryType (434 milliseconds)
        [info] - test all data types - BooleanType (406 milliseconds)
        20:59:38.618 ERROR org.apache.spark.executor.Executor: Exception in 
task 0.0 in stage 2597.0 (TID 67966)
        java.lang.ArrayIndexOutOfBoundsException: 46
        at 
org.apache.spark.sql.execution.datasources.parquet.VectorizedPlainValuesReader.readBytes(VectorizedPlainValuesReader.java:88)

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

    $ git pull https://github.com/viirya/spark-1 fix-readbytes

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

    https://github.com/apache/spark/pull/11418.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 #11418
    
----
commit 44f5c4104f357ac71b5d5d295e77e8a2902f683a
Author: Liang-Chi Hsieh <[email protected]>
Date:   2016-02-28T08:18:31Z

    Fix readBytes.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to