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 2021/03/25 09:11:47 UTC

[GitHub] [spark] c21 opened a new pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

c21 opened a new pull request #31958:
URL: https://github.com/apache/spark/pull/31958


   <!--
   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 PR is to support nested column type in Spark ORC vectorized reader. Currently ORC vectorized reader [does not support nested column type (struct, array and map)](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala#L138). We implemented nested column vectorized reader for FB-ORC in our internal fork of Spark. We are seeing performance improvement compared to non-vectorized reader when reading nested columns. In addition, this can also help improve the non-nested column performance when reading non-nested and nested columns together in one query.
   
   Before this PR:
   
   * `OrcColumnVector` is the implementation class for Spark's `ColumnVector` to wrap Hive's/ORC's `ColumnVector` to read `AtomicType` data.
   
   After this PR:
   
   * `OrcColumnVector` is an abstract class to keep interface being shared between multiple implementation class of orc column vectors, namely `OrcAtomicColumnVector` (for `AtomicType`), `OrcArrayColumnVector` (for `ArrayType`), `OrcMapColumnVector` (for `MapType`), `OrcStructColumnVector` (for `StructType`). So the original logic to read `AtomicType` data is moved from `OrcColumnVector` to `OrcAtomicColumnVector`. The abstract class of `OrcColumnVector` is needed here because of supporting nested column (i.e. nested column vectors).
   * A utility method `OrcColumnVectorUtils.toOrcColumnVector` is added to create Spark's `OrcColumnVector` from Hive's/ORC's `ColumnVector`.
   * A new user-facing config `spark.sql.orc.enableNestedColumnVectorizedReader` is added to control enabling/disabling vectorized reader for nested columns. The default value is true (i.e. enabling by default). For certain tables having deep nested columns, vectorized reader might take too much memory for each sub-column vectors, compared to non-vectorized reader. So providing a config here to work around OOM for query reading wide and deep nested columns if any.
   
   ### 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.
   -->
   Improve query performance when reading nested columns from ORC file format.
   Tested with locally adding a small benchmark in `OrcReadBenchmark.scala`. Seeing more than 1x run time improvement.
   
   ```
   Running benchmark: SQL Nested Column Scan
     Running case: Native ORC MR
     Stopped after 2 iterations, 37850 ms
     Running case: Native ORC Vectorized (Enabled Nested Column)
     Stopped after 2 iterations, 15892 ms
     Running case: Native ORC Vectorized (Disabled Nested Column)
     Stopped after 2 iterations, 37954 ms
     Running case: Hive built-in ORC
     Stopped after 2 iterations, 35118 ms
   
   Java HotSpot(TM) 64-Bit Server VM 1.8.0_181-b13 on Mac OS X 10.15.7
   Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
   SQL Nested Column Scan:                         Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
   ------------------------------------------------------------------------------------------------------------------------------
   Native ORC MR                                           18706          18925         310          0.1       17839.6       1.0X
   Native ORC Vectorized (Enabled Nested Column)            7625           7946         455          0.1        7271.6       2.5X
   Native ORC Vectorized (Disabled Nested Column)          18415          18977         796          0.1       17561.5       1.0X
   Hive built-in ORC                                       17469          17559         127          0.1       16660.1       1.1X
   ```
   
   Benchmark:
   
   ```
   nestedColumnScanBenchmark(1024 * 1024)
   def nestedColumnScanBenchmark(values: Int): Unit = {
       val benchmark = new Benchmark(s"SQL Nested Column Scan", values, output = output)
   
       withTempPath { dir =>
         withTempTable("t1", "nativeOrcTable", "hiveOrcTable") {
           import spark.implicits._
           spark.range(values).map(_ => Random.nextLong).map { x =>
             val arrayOfStructColumn = (0 until 5).map(i => (x + i, s"$x" * 5))
             val mapOfStructColumn = Map(
               s"$x" -> (x * 0.1, (x, s"$x" * 100)),
               (s"$x" * 2) -> (x * 0.2, (x, s"$x" * 200)),
               (s"$x" * 3) -> (x * 0.3, (x, s"$x" * 300)))
             (arrayOfStructColumn, mapOfStructColumn)
           }.toDF("col1", "col2")
             .createOrReplaceTempView("t1")
   
           prepareTable(dir, spark.sql(s"SELECT * FROM t1"))
   
           benchmark.addCase("Native ORC MR") { _ =>
             withSQLConf(SQLConf.ORC_VECTORIZED_READER_ENABLED.key -> "false") {
               spark.sql("SELECT SUM(SIZE(col1)), SUM(SIZE(col2)) FROM nativeOrcTable").noop()
             }
           }
   
           benchmark.addCase("Native ORC Vectorized (Enabled Nested Column)") { _ =>
             spark.sql("SELECT SUM(SIZE(col1)), SUM(SIZE(col2)) FROM nativeOrcTable").noop()
           }
   
           benchmark.addCase("Native ORC Vectorized (Disabled Nested Column)") { _ =>
             withSQLConf(SQLConf.ORC_VECTORIZED_READER_NESTED_COLUMN_ENABLED.key -> "false") {
               spark.sql("SELECT SUM(SIZE(col1)), SUM(SIZE(col2)) FROM nativeOrcTable").noop()
             }
           }
   
           benchmark.addCase("Hive built-in ORC") { _ =>
             spark.sql("SELECT SUM(SIZE(col1)), SUM(SIZE(col2)) FROM hiveOrcTable").noop()
           }
   
           benchmark.run()
         }
       }
     }
   ```
   
   
   ### 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'.
   -->
   
   
   ### 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.
   -->
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136577 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136577/testReport)** for PR 31958 at commit [`d669815`](https://github.com/apache/spark/commit/d66981505c1613457c732374d6446e2ff79ff2c5).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136538 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136538/testReport)** for PR 31958 at commit [`94df62c`](https://github.com/apache/spark/commit/94df62ce3376d2579ad26c1a84347bb46895d9fc).


-- 
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 closed pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136538 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136538/testReport)** for PR 31958 at commit [`94df62c`](https://github.com/apache/spark/commit/94df62ce3376d2579ad26c1a84347bb46895d9fc).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41122/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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] c21 commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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



##########
File path: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcMapColumnVector.java
##########
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.datasources.orc;
+
+import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
+
+import org.apache.spark.sql.types.DataType;
+import org.apache.spark.sql.types.Decimal;
+import org.apache.spark.sql.types.MapType;
+import org.apache.spark.sql.vectorized.ColumnarArray;
+import org.apache.spark.sql.vectorized.ColumnarMap;
+import org.apache.spark.unsafe.types.UTF8String;
+
+/**
+ * A column vector implementation for Spark's {@link MapType}.
+ */
+public class OrcMapColumnVector extends OrcColumnVector {
+  private final OrcColumnVector keys;
+  private final OrcColumnVector values;
+  private final long[] offsets;
+  private final long[] lengths;
+
+  OrcMapColumnVector(
+    DataType type,

Review comment:
       @cloud-fan - updated.

##########
File path: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcArrayColumnVector.java
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.datasources.orc;
+
+import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
+import org.apache.spark.sql.types.ArrayType;
+import org.apache.spark.sql.types.DataType;
+import org.apache.spark.sql.types.Decimal;
+import org.apache.spark.sql.vectorized.ColumnarArray;
+import org.apache.spark.sql.vectorized.ColumnarMap;
+import org.apache.spark.unsafe.types.UTF8String;
+
+/**
+ * A column vector implementation for Spark's {@link ArrayType}.
+ */
+public class OrcArrayColumnVector extends OrcColumnVector {
+  private final OrcColumnVector data;
+  private final long[] offsets;
+  private final long[] lengths;
+
+  OrcArrayColumnVector(
+    DataType type,

Review comment:
       @cloud-fan - updated.




-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41164/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41345/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41171/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136578 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136578/testReport)** for PR 31958 at commit [`5e4eb0f`](https://github.com/apache/spark/commit/5e4eb0f447ff1e9cfd561bc526a05756019fdf98).
    * This patch **fails Spark unit 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] SparkQA removed a comment on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136781 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136781/testReport)** for PR 31958 at commit [`44feacc`](https://github.com/apache/spark/commit/44feaccadc8fa81ad9f885686685431f3976f537).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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






-- 
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] c21 commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   cc @cloud-fan, @maropu and @dongjoon-hyun could you help take a look when you have time, thanks.


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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] c21 commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   @cloud-fan and @viirya could you help take a look? Thanks.


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41161/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136514 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136514/testReport)** for PR 31958 at commit [`7037893`](https://github.com/apache/spark/commit/7037893e4cd5794ac5675f9562d7d88c750940be).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136580 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136580/testReport)** for PR 31958 at commit [`7cb533c`](https://github.com/apache/spark/commit/7cb533c019ddeca69b58a9b5b3be150e56733943).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136781 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136781/testReport)** for PR 31958 at commit [`44feacc`](https://github.com/apache/spark/commit/44feaccadc8fa81ad9f885686685431f3976f537).


-- 
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] dongjoon-hyun commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #31958:
URL: https://github.com/apache/spark/pull/31958#issuecomment-808946403


   Also, cc @viirya since this is related to the nested columns.


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136587 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136587/testReport)** for PR 31958 at commit [`f30cc88`](https://github.com/apache/spark/commit/f30cc881a1f11c5b8bc521d9bc27e71ba065e760).
    * 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] dongjoon-hyun commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r603041575



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
##########
@@ -131,11 +131,27 @@ class OrcFileFormat
     }
   }
 
+  private def supportBatchForNestedColumn(
+      sparkSession: SparkSession,
+      schema: StructType): Boolean = {
+    val hasNestedColumn = schema.map(_.dataType).exists {
+      case _: ArrayType | _: MapType | _: StructType => true
+      case _ => false
+    }
+    if (hasNestedColumn) {
+      sparkSession.sessionState.conf.orcVectorizedReaderNestedColumnEnabled
+    } else {
+      true
+    }
+  }
+
   override def supportBatch(sparkSession: SparkSession, schema: StructType): Boolean = {
     val conf = sparkSession.sessionState.conf
     conf.orcVectorizedReaderEnabled && conf.wholeStageEnabled &&
       schema.length <= conf.wholeStageMaxNumFields &&
-      schema.forall(_.dataType.isInstanceOf[AtomicType])
+      schema.forall(s => supportDataType(s.dataType) &&
+        !s.dataType.isInstanceOf[UserDefinedType[_]]) &&
+      supportBatchForNestedColumn(sparkSession, schema)

Review comment:
       Yes, thank you for creating SPARK-34863.




-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41164/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136764 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136764/testReport)** for PR 31958 at commit [`fda6b12`](https://github.com/apache/spark/commit/fda6b126d7d57886e5b48254adcd466d5085c3fc).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41099/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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] dongjoon-hyun commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #31958:
URL: https://github.com/apache/spark/pull/31958#issuecomment-812641347


   Thank you, @c21 and all!


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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



##########
File path: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcArrayColumnVector.java
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.datasources.orc;
+
+import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
+import org.apache.spark.sql.types.ArrayType;

Review comment:
       We have a blank line between third party import and Spark's import.




-- 
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] dongjoon-hyun commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r602918532



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
##########
@@ -131,11 +131,27 @@ class OrcFileFormat
     }
   }
 
+  private def supportBatchForNestedColumn(
+      sparkSession: SparkSession,
+      schema: StructType): Boolean = {
+    val hasNestedColumn = schema.map(_.dataType).exists {
+      case _: ArrayType | _: MapType | _: StructType => true
+      case _ => false
+    }
+    if (hasNestedColumn) {
+      sparkSession.sessionState.conf.orcVectorizedReaderNestedColumnEnabled
+    } else {
+      true
+    }
+  }
+
   override def supportBatch(sparkSession: SparkSession, schema: StructType): Boolean = {
     val conf = sparkSession.sessionState.conf
     conf.orcVectorizedReaderEnabled && conf.wholeStageEnabled &&
       schema.length <= conf.wholeStageMaxNumFields &&
-      schema.forall(_.dataType.isInstanceOf[AtomicType])
+      schema.forall(s => supportDataType(s.dataType) &&
+        !s.dataType.isInstanceOf[UserDefinedType[_]]) &&
+      supportBatchForNestedColumn(sparkSession, schema)

Review comment:
       Can we do the same thing for Parquet, @c21 ?




-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136764 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136764/testReport)** for PR 31958 at commit [`fda6b12`](https://github.com/apache/spark/commit/fda6b126d7d57886e5b48254adcd466d5085c3fc).
    * 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] c21 commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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



##########
File path: project/MimaExcludes.scala
##########
@@ -40,7 +40,22 @@ object MimaExcludes {
     ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.connector.write.V1WriteBuilder"),
 
     // [SPARK-33955] Add latest offsets to source progress
-    ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.SourceProgress.this")
+    ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.SourceProgress.this"),
+
+    // [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Review comment:
       @cloud-fan - yeah it's weird. We don't change `ColumnVector` class at all. Do you have any idea for how to debug on this? I am still checking why, thanks.




-- 
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] dongjoon-hyun commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r602918048



##########
File path: project/MimaExcludes.scala
##########
@@ -417,6 +417,21 @@ object MimaExcludes {
       case _ => true
     },
 
+    // [SPARK-34862][SQL] Support nested column in ORC vectorized reader
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getBoolean"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getByte"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getShort"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getInt"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getLong"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getFloat"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getDouble"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getDecimal"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getUTF8String"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getBinary"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getArray"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getMap"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getChild"),

Review comment:
       If we need this, this should go to `v32excludes`, @c21 . Shall we move this to line 43?
   ```
   // Exclude rules for 3.2.x
   lazy val v32excludes = v31excludes ++ Seq(
   ```




-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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] cloud-fan commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r604058132



##########
File path: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcArrayColumnVector.java
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.datasources.orc;
+
+import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
+import org.apache.spark.sql.types.ArrayType;
+import org.apache.spark.sql.types.DataType;
+import org.apache.spark.sql.types.Decimal;
+import org.apache.spark.sql.vectorized.ColumnarArray;
+import org.apache.spark.sql.vectorized.ColumnarMap;
+import org.apache.spark.unsafe.types.UTF8String;
+
+/**
+ * A column vector implementation for Spark's {@link ArrayType}.
+ */
+public class OrcArrayColumnVector extends OrcColumnVector {
+  private final OrcColumnVector data;
+  private final long[] offsets;
+  private final long[] lengths;
+
+  OrcArrayColumnVector(
+    DataType type,

Review comment:
       nit: 4 spaces indentation for parameters.




-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136580 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136580/testReport)** for PR 31958 at commit [`7cb533c`](https://github.com/apache/spark/commit/7cb533c019ddeca69b58a9b5b3be150e56733943).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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






-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136587 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136587/testReport)** for PR 31958 at commit [`f30cc88`](https://github.com/apache/spark/commit/f30cc881a1f11c5b8bc521d9bc27e71ba065e760).


-- 
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] cloud-fan commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r604060703



##########
File path: project/MimaExcludes.scala
##########
@@ -40,7 +40,22 @@ object MimaExcludes {
     ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.connector.write.V1WriteBuilder"),
 
     // [SPARK-33955] Add latest offsets to source progress
-    ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.SourceProgress.this")
+    ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.SourceProgress.this"),
+
+    // [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Review comment:
       This is weird, where do we change `org.apache.spark.sql.vectorized.ColumnVector` in this PR?




-- 
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] c21 commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Thank you @viirya, @cloud-fan and @dongjoon-hyun for review!


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41364/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136781 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136781/testReport)** for PR 31958 at commit [`44feacc`](https://github.com/apache/spark/commit/44feaccadc8fa81ad9f885686685431f3976f537).
    * 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] SparkQA commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136538 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136538/testReport)** for PR 31958 at commit [`94df62c`](https://github.com/apache/spark/commit/94df62ce3376d2579ad26c1a84347bb46895d9fc).
    * This patch **fails MiMa 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 commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136764 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136764/testReport)** for PR 31958 at commit [`fda6b12`](https://github.com/apache/spark/commit/fda6b126d7d57886e5b48254adcd466d5085c3fc).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136577 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136577/testReport)** for PR 31958 at commit [`d669815`](https://github.com/apache/spark/commit/d66981505c1613457c732374d6446e2ff79ff2c5).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136587 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136587/testReport)** for PR 31958 at commit [`f30cc88`](https://github.com/apache/spark/commit/f30cc881a1f11c5b8bc521d9bc27e71ba065e760).


-- 
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] c21 commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -838,6 +838,13 @@ object SQLConf {
     .intConf
     .createWithDefault(4096)
 
+  val ORC_VECTORIZED_READER_NESTED_COLUMN_ENABLED =
+    buildConf("spark.sql.orc.enableNestedColumnVectorizedReader")
+      .doc("Enables vectorized orc decoding for nested column.")
+      .version("3.2.0")
+      .booleanConf
+      .createWithDefault(true)

Review comment:
       @dongjoon-hyun - makes sense to me. Updated. For all reviewers, https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136587/testReport is the passed unit tests when enabling nested column vectorized reader by default.

##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
##########
@@ -131,11 +131,27 @@ class OrcFileFormat
     }
   }
 
+  private def supportBatchForNestedColumn(
+      sparkSession: SparkSession,
+      schema: StructType): Boolean = {
+    val hasNestedColumn = schema.map(_.dataType).exists {
+      case _: ArrayType | _: MapType | _: StructType => true
+      case _ => false
+    }
+    if (hasNestedColumn) {
+      sparkSession.sessionState.conf.orcVectorizedReaderNestedColumnEnabled
+    } else {
+      true
+    }
+  }
+
   override def supportBatch(sparkSession: SparkSession, schema: StructType): Boolean = {
     val conf = sparkSession.sessionState.conf
     conf.orcVectorizedReaderEnabled && conf.wholeStageEnabled &&
       schema.length <= conf.wholeStageMaxNumFields &&
-      schema.forall(_.dataType.isInstanceOf[AtomicType])
+      schema.forall(s => supportDataType(s.dataType) &&
+        !s.dataType.isInstanceOf[UserDefinedType[_]]) &&
+      supportBatchForNestedColumn(sparkSession, schema)

Review comment:
       @dongjoon-hyun - do you mean implementing Parquet vectorized reader for nested column? I created https://issues.apache.org/jira/browse/SPARK-34863 and plan to do it after this one, thanks.

##########
File path: project/MimaExcludes.scala
##########
@@ -417,6 +417,21 @@ object MimaExcludes {
       case _ => true
     },
 
+    // [SPARK-34862][SQL] Support nested column in ORC vectorized reader
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getBoolean"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getByte"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getShort"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getInt"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getLong"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getFloat"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getDouble"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getDecimal"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getUTF8String"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getBinary"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getArray"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getMap"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getChild"),

Review comment:
       @dongjoon-hyun - updated, thanks. Sorry I was not looking at this file very closely.




-- 
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] cloud-fan commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r604657478



##########
File path: project/MimaExcludes.scala
##########
@@ -40,7 +40,22 @@ object MimaExcludes {
     ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.connector.write.V1WriteBuilder"),
 
     // [SPARK-33955] Add latest offsets to source progress
-    ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.SourceProgress.this")
+    ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.SourceProgress.this"),
+
+    // [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Review comment:
       maybe it's some bugs in Mima, not a bit deal as we know this PR doesn't break binary compatibility.




-- 
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 pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Thanks. Merging to master.


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41364/
   


-- 
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] cloud-fan commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r604080214



##########
File path: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcMapColumnVector.java
##########
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.datasources.orc;
+
+import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
+
+import org.apache.spark.sql.types.DataType;
+import org.apache.spark.sql.types.Decimal;
+import org.apache.spark.sql.types.MapType;
+import org.apache.spark.sql.vectorized.ColumnarArray;
+import org.apache.spark.sql.vectorized.ColumnarMap;
+import org.apache.spark.unsafe.types.UTF8String;
+
+/**
+ * A column vector implementation for Spark's {@link MapType}.
+ */
+public class OrcMapColumnVector extends OrcColumnVector {
+  private final OrcColumnVector keys;
+  private final OrcColumnVector values;
+  private final long[] offsets;
+  private final long[] lengths;
+
+  OrcMapColumnVector(
+    DataType type,

Review comment:
       ditto, indentation




-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41161/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41122/
   


-- 
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] c21 commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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



##########
File path: project/MimaExcludes.scala
##########
@@ -40,7 +40,22 @@ object MimaExcludes {
     ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.connector.write.V1WriteBuilder"),
 
     // [SPARK-33955] Add latest offsets to source progress
-    ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.SourceProgress.this")
+    ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.SourceProgress.this"),
+
+    // [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Review comment:
       @cloud-fan - spent some time checking, but still not sure where the issue is, so I agree with you that might be some bug in Mima.




-- 
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] c21 commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   The unit test failed with MiMa tests
   
   > abstract method getBoolean(Int)Boolean in class org.apache.spark.sql.vectorized.ColumnVector does not have a correspondent in current version
   
   However in this PR, the class `org.apache.spark.sql.vectorized.ColumnVector` is not changed at all. I am still checking why this test is failing.


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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






-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136578 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136578/testReport)** for PR 31958 at commit [`5e4eb0f`](https://github.com/apache/spark/commit/5e4eb0f447ff1e9cfd561bc526a05756019fdf98).


-- 
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] c21 commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Thank you @dongjoon-hyun and look forward to getting your feedback on this.
   In the meanwhile I am checking the binary compatibility failures in unit test.


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136580 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136580/testReport)** for PR 31958 at commit [`7cb533c`](https://github.com/apache/spark/commit/7cb533c019ddeca69b58a9b5b3be150e56733943).
    * This patch **fails Spark unit 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] SparkQA commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41099/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136577 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136577/testReport)** for PR 31958 at commit [`d669815`](https://github.com/apache/spark/commit/d66981505c1613457c732374d6446e2ff79ff2c5).
    * This patch **fails MiMa 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] SparkQA commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136635 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136635/testReport)** for PR 31958 at commit [`9cd3bc5`](https://github.com/apache/spark/commit/9cd3bc573514a9e25f1e7364aacfb4c86c661552).


-- 
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] cloud-fan commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #31958:
URL: https://github.com/apache/spark/pull/31958#issuecomment-810230569


   For orc files without nested schema, do we observe perf regression after this PR?


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41162/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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] c21 commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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



##########
File path: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcArrayColumnVector.java
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.datasources.orc;
+
+import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
+import org.apache.spark.sql.types.ArrayType;

Review comment:
       @viirya - yes, I missed somehow, thanks for the careful review, updated.




-- 
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] c21 commented on pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   > For orc files without nested schema, do we observe perf regression after this PR?
   
   @cloud-fan - in theory here the difference for non-nested schema:
   
   Before this PR:
   
   ```
   OrcColumnVector -> org.apache.spark.sql.vectorized.ColumnVector
   ```
   
   After this PR:
   
   ```
   OrcAtomicColumnVector -> OrcColumnVector -> org.apache.spark.sql.vectorized.ColumnVector
   ```
   
   The only overhead introduced here is one more layer in classes, and might be some overhead for virtual function call and class loading.
   
   Tested on same type of machine in AWS EC2 for all ORC reader benchmarks: [OrcReadBenchmark-results.txt](https://github.com/apache/spark/blob/master/sql/hive/benchmarks/OrcReadBenchmark-results.txt) and [DataSourceReadBenchmark-results.txt](https://github.com/apache/spark/blob/master/sql/core/benchmarks/DataSourceReadBenchmark-results.txt) (java 8 here). Do not see regression compared ORC vectorized reader and other ORC readers.
   
   Results:
   
   [OrcReadBenchmark-results.txt](https://gist.github.com/c21/978bd38abb781af83ec19cec80000759)
   [DataSourceReadBenchmark-results.txt](https://gist.github.com/c21/62391f8cfdaf4f15acac0ee168e3b86b)
   
   Machine:
   
   ```
   Amazon AWS EC2
   type: r3.xlarge
   region: us-west-2 (Oregon)
   OS: Linux
   ```


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41162/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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






-- 
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] dongjoon-hyun commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r602918048



##########
File path: project/MimaExcludes.scala
##########
@@ -417,6 +417,21 @@ object MimaExcludes {
       case _ => true
     },
 
+    // [SPARK-34862][SQL] Support nested column in ORC vectorized reader
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getBoolean"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getByte"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getShort"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getInt"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getLong"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getFloat"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getDouble"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getDecimal"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getUTF8String"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getBinary"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getArray"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getMap"),
+    ProblemFilters.exclude[DirectAbstractMethodProblem]("org.apache.spark.sql.vectorized.ColumnVector.getChild"),

Review comment:
       If we need this, this should go to `v32excludes`, @c21 .
   ```
   // Exclude rules for 3.2.x
   lazy val v32excludes = v31excludes ++ Seq(
   ```




-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136514 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136514/testReport)** for PR 31958 at commit [`7037893`](https://github.com/apache/spark/commit/7037893e4cd5794ac5675f9562d7d88c750940be).
    * This patch **fails RAT tests**.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `public class OrcArrayColumnVector extends OrcColumnVector `
     * `public class OrcAtomicColumnVector extends OrcColumnVector `
     * `public abstract class OrcColumnVector extends org.apache.spark.sql.vectorized.ColumnVector `
     * `class OrcColumnVectorUtils `
     * `public class OrcMapColumnVector extends OrcColumnVector `
     * `public class OrcStructColumnVector extends OrcColumnVector `


-- 
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] dongjoon-hyun commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r602918244



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -838,6 +838,13 @@ object SQLConf {
     .intConf
     .createWithDefault(4096)
 
+  val ORC_VECTORIZED_READER_NESTED_COLUMN_ENABLED =
+    buildConf("spark.sql.orc.enableNestedColumnVectorizedReader")
+      .doc("Enables vectorized orc decoding for nested column.")
+      .version("3.2.0")
+      .booleanConf
+      .createWithDefault(true)

Review comment:
       To be safe, I'd recommend to start with `false` at Apache Spark 3.2. Then, you can switch it to `true` at Apache Spark 3.3.




-- 
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] cloud-fan commented on a change in pull request #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #31958:
URL: https://github.com/apache/spark/pull/31958#discussion_r604080214



##########
File path: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcMapColumnVector.java
##########
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.datasources.orc;
+
+import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
+
+import org.apache.spark.sql.types.DataType;
+import org.apache.spark.sql.types.Decimal;
+import org.apache.spark.sql.types.MapType;
+import org.apache.spark.sql.vectorized.ColumnarArray;
+import org.apache.spark.sql.vectorized.ColumnarMap;
+import org.apache.spark.unsafe.types.UTF8String;
+
+/**
+ * A column vector implementation for Spark's {@link MapType}.
+ */
+public class OrcMapColumnVector extends OrcColumnVector {
+  private final OrcColumnVector keys;
+  private final OrcColumnVector values;
+  private final long[] offsets;
+  private final long[] lengths;
+
+  OrcMapColumnVector(
+    DataType type,

Review comment:
       dito, indentation




-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41171/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136578 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136578/testReport)** for PR 31958 at commit [`5e4eb0f`](https://github.com/apache/spark/commit/5e4eb0f447ff1e9cfd561bc526a05756019fdf98).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41345/
   


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   **[Test build #136514 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136514/testReport)** for PR 31958 at commit [`7037893`](https://github.com/apache/spark/commit/7037893e4cd5794ac5675f9562d7d88c750940be).


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


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


-- 
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 #31958: [SPARK-34862][SQL] Support nested column in ORC vectorized reader

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


   cc @viirya too


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