You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/24 02:59:36 UTC

[GitHub] [spark] BryanCutler opened a new pull request #28915: [SPARK-32080][SQL] Simplify ArrowColumnVector ListArray accessor

BryanCutler opened a new pull request #28915:
URL: https://github.com/apache/spark/pull/28915


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   This change simplifies the ArrowColumnVector ListArray accessor to use provided Arrow APIs available in v0.15.0 to calculate element indices.
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   This simplifies the code by avoiding manual calculations on the Arrow offset buffer and makes use of more stable APIs.
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   Existing tests


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648635480


   **[Test build #124451 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/124451/testReport)** for PR 28915 at commit [`59dd8ea`](https://github.com/apache/spark/commit/59dd8ea5d758def18691c7123446edcde3389ab4).
    * This patch **fails due to an unknown error code, -9**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28915: [SPARK-32080][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648554618


   **[Test build #124451 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/124451/testReport)** for PR 28915 at commit [`59dd8ea`](https://github.com/apache/spark/commit/59dd8ea5d758def18691c7123446edcde3389ab4).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648642832


   retest this please


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] BryanCutler commented on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
BryanCutler commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648961837


   Thanks @HyukjinKwon and @viirya !


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648643658


   **[Test build #124470 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/124470/testReport)** for PR 28915 at commit [`59dd8ea`](https://github.com/apache/spark/commit/59dd8ea5d758def18691c7123446edcde3389ab4).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] BryanCutler commented on pull request #28915: [SPARK-32080][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
BryanCutler commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648553298


   This also avoid having to deal with an API change in the ArrowBuf class for Arrow 1.0.0 and will allow Arrow-Spark integration tests to run again in preparation for the 1.0.0 release, see https://github.com/apache/arrow/pull/6316.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648635949






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28915: [SPARK-32080][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648554982






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648554618


   **[Test build #124451 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/124451/testReport)** for PR 28915 at commit [`59dd8ea`](https://github.com/apache/spark/commit/59dd8ea5d758def18691c7123446edcde3389ab4).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] BryanCutler commented on a change in pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
BryanCutler commented on a change in pull request #28915:
URL: https://github.com/apache/spark/pull/28915#discussion_r445059227



##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ArrowColumnVector.java
##########
@@ -458,10 +457,8 @@ final boolean isNullAt(int rowId) {
 
     @Override
     final ColumnarArray getArray(int rowId) {
-      ArrowBuf offsets = accessor.getOffsetBuffer();
-      int index = rowId * ListVector.OFFSET_WIDTH;
-      int start = offsets.getInt(index);
-      int end = offsets.getInt(index + ListVector.OFFSET_WIDTH);
+      int start = accessor.getElementStartIndex(rowId);

Review comment:
       Thanks @viirya , I wasn't aware SPARK-31998 was made, but yes that was the motivation for this fix.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] viirya commented on a change in pull request #28915: [SPARK-32080][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #28915:
URL: https://github.com/apache/spark/pull/28915#discussion_r444661658



##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ArrowColumnVector.java
##########
@@ -458,10 +457,8 @@ final boolean isNullAt(int rowId) {
 
     @Override
     final ColumnarArray getArray(int rowId) {
-      ArrowBuf offsets = accessor.getOffsetBuffer();
-      int index = rowId * ListVector.OFFSET_WIDTH;
-      int start = offsets.getInt(index);
-      int end = offsets.getInt(index + ListVector.OFFSET_WIDTH);
+      int start = accessor.getElementStartIndex(rowId);

Review comment:
       for references: https://github.com/apache/arrow/blob/master/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java#L863-L871




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648643658


   **[Test build #124470 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/124470/testReport)** for PR 28915 at commit [`59dd8ea`](https://github.com/apache/spark/commit/59dd8ea5d758def18691c7123446edcde3389ab4).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648803415


   **[Test build #124470 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/124470/testReport)** for PR 28915 at commit [`59dd8ea`](https://github.com/apache/spark/commit/59dd8ea5d758def18691c7123446edcde3389ab4).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648644218






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648804665






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon closed pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #28915:
URL: https://github.com/apache/spark/pull/28915


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648635949


   Merged build finished. Test FAILed.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28915: [SPARK-32080][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648554982






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648644218






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648811746


   Merged to master and branch-3.0.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648635957


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/124451/
   Test FAILed.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28915: [SPARK-32080][SPARK-31998][SQL] Simplify ArrowColumnVector ListArray accessor

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28915:
URL: https://github.com/apache/spark/pull/28915#issuecomment-648804665






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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