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/04/21 23:55:29 UTC

[GitHub] [spark] wangyum opened a new pull request #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

wangyum opened a new pull request #32279:
URL: https://github.com/apache/spark/pull/32279


   This PR backports https://github.com/apache/spark/pull/31993 to branch-3.1. The origin PR description:
   
   
   
   ### What changes were proposed in this pull request?
   
   It will remove `StructField` when [pruning nested columns](https://github.com/apache/spark/blob/0f2c0b53e8fb18c86c67b5dd679c006db93f94a5/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SchemaPruning.scala#L28-L42). For example:
   ```scala
   spark.sql(
     """
       |CREATE TABLE t1 (
       |  _col0 INT,
       |  _col1 STRING,
       |  _col2 STRUCT<c1: STRING, c2: STRING, c3: STRING, c4: BIGINT>)
       |USING ORC
       |""".stripMargin)
   
   spark.sql("INSERT INTO t1 values(1, '2', struct('a', 'b', 'c', 10L))")
   
   spark.sql("SELECT _col0, _col2.c1 FROM t1").show
   ```
   
   Before this pr. The returned schema is: ``` `_col0` INT,`_col2` STRUCT<`c1`: STRING> ``` add it will throw exception:
   ```
   java.lang.AssertionError: assertion failed: The given data schema struct<_col0:int,_col2:struct<c1:string>> has less fields than the actual ORC physical schema, no idea which columns were dropped, fail to read.
   	at scala.Predef$.assert(Predef.scala:223)
   	at org.apache.spark.sql.execution.datasources.orc.OrcUtils$.requestedColumnIds(OrcUtils.scala:160)
   ```
   
   After this pr. The returned schema is: ``` `_col0` INT,`_col1` STRING,`_col2` STRUCT<`c1`: STRING> ```.
   
   
   The finally schema is ``` `_col0` INT,`_col2` STRUCT<`c1`: STRING> ``` after the complete column pruning:
   https://github.com/apache/spark/blob/7a5647a93aaea9d1d78d9262e24fc8c010db04d0/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategy.scala#L208-L213
   
   https://github.com/apache/spark/blob/e64eb75aede71a5403a4d4436e63b1fcfdeca14d/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/PushDownUtils.scala#L96-L97
   
   
   
   ### Why are the changes needed?
   
   Fix bug.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   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] AmplabJenkins commented on pull request #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


   **[Test build #137754 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137754/testReport)** for PR 32279 at commit [`040de22`](https://github.com/apache/spark/commit/040de225c6ec45ca417bccb13754d6a3bf541f9b).


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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] wangyum commented on pull request #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


   Merged to branch-3.1.


-- 
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] wangyum commented on pull request #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


   retest this please.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



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


[GitHub] [spark] wangyum closed pull request #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


   


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


   **[Test build #137840 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137840/testReport)** for PR 32279 at commit [`040de22`](https://github.com/apache/spark/commit/040de225c6ec45ca417bccb13754d6a3bf541f9b).


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


   **[Test build #137754 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137754/testReport)** for PR 32279 at commit [`040de22`](https://github.com/apache/spark/commit/040de225c6ec45ca417bccb13754d6a3bf541f9b).
    * This patch **fails SparkR 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] AmplabJenkins commented on pull request #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


   **[Test build #137754 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137754/testReport)** for PR 32279 at commit [`040de22`](https://github.com/apache/spark/commit/040de225c6ec45ca417bccb13754d6a3bf541f9b).


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


   **[Test build #137840 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137840/testReport)** for PR 32279 at commit [`040de22`](https://github.com/apache/spark/commit/040de225c6ec45ca417bccb13754d6a3bf541f9b).


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


-- 
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 #32279: [SPARK-34897][SQL][3.1] Support reconcile schemas based on index after nested column pruning

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


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


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