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/22 04:21:13 UTC

[GitHub] [spark] sandeep-katta opened a new pull request #32284: [SPARK-35096][SQL][BackPort] SchemaPruning should adhere spark.sql.caseSensitive config

sandeep-katta opened a new pull request #32284:
URL: https://github.com/apache/spark/pull/32284


   ### What changes were proposed in this pull request?
   
   As a part of the SPARK-26837 pruning of nested fields from object serializers are supported. But it is missed to handle case insensitivity nature of spark
   
   In this PR I have resolved the column names to be pruned based on `spark.sql.caseSensitive ` config
   **Exception Before Fix**
   
   ```
   Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
     at org.apache.spark.sql.types.StructType.apply(StructType.scala:414)
     at org.apache.spark.sql.catalyst.optimizer.ObjectSerializerPruning$$anonfun$apply$4.$anonfun$applyOrElse$3(objects.scala:216)
     at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)
     at scala.collection.immutable.List.foreach(List.scala:392)
     at scala.collection.TraversableLike.map(TraversableLike.scala:238)
     at scala.collection.TraversableLike.map$(TraversableLike.scala:231)
     at scala.collection.immutable.List.map(List.scala:298)
     at org.apache.spark.sql.catalyst.optimizer.ObjectSerializerPruning$$anonfun$apply$4.applyOrElse(objects.scala:215)
     at org.apache.spark.sql.catalyst.optimizer.ObjectSerializerPruning$$anonfun$apply$4.applyOrElse(objects.scala:203)
     at org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDown$1(TreeNode.scala:309)
     at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:72)
     at org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:309)
     at 
   ```
   
   ### Why are the changes needed?
   After Upgrade to Spark 3 `foreachBatch` API throws` java.lang.ArrayIndexOutOfBoundsException`. This issue will be fixed using this PR
   
   
   ### Does this PR introduce _any_ user-facing change?
   No, Infact fixes the regression
   
   
   ### How was this patch tested?
   Added tests and also tested verified manually


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


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


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SchemaPruning.scala
##########
@@ -28,6 +31,7 @@ object SchemaPruning {
   def pruneDataSchema(
       dataSchema: StructType,
       requestedRootFields: Seq[RootField]): StructType = {
+    val resolver = sqlConf.resolver

Review comment:
       Combine L25, i.e.`val resolver = SQLConf.get.resolver`?




-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


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


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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






-- 
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] sandeep-katta commented on a change in pull request #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

Posted by GitBox <gi...@apache.org>.
sandeep-katta commented on a change in pull request #32284:
URL: https://github.com/apache/spark/pull/32284#discussion_r618070895



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SchemaPruning.scala
##########
@@ -28,6 +31,7 @@ object SchemaPruning {
   def pruneDataSchema(
       dataSchema: StructType,
       requestedRootFields: Seq[RootField]): StructType = {
+    val resolver = sqlConf.resolver

Review comment:
       This will always returns same resolver, it cannot be changed dynmanically




-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


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


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


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


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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






-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


   **[Test build #137772 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137772/testReport)** for PR 32284 at commit [`0165bd6`](https://github.com/apache/spark/commit/0165bd670bba70384db8bdf16cab242fb8536822).


-- 
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 #32284: [SPARK-35096][SQL][BackPort] SchemaPruning should adhere spark.sql.caseSensitive config

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


   **[Test build #137770 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137770/testReport)** for PR 32284 at commit [`8ecfb95`](https://github.com/apache/spark/commit/8ecfb95ff64a46fd7155e2af6e8d4f7fb78dca3e).


-- 
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] sandeep-katta commented on a change in pull request #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

Posted by GitBox <gi...@apache.org>.
sandeep-katta commented on a change in pull request #32284:
URL: https://github.com/apache/spark/pull/32284#discussion_r618071032



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SchemaPruning.scala
##########
@@ -28,6 +31,7 @@ object SchemaPruning {
   def pruneDataSchema(
       dataSchema: StructType,
       requestedRootFields: Seq[RootField]): StructType = {
+    val resolver = sqlConf.resolver

Review comment:
       Okay will do that




-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


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


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


   **[Test build #137772 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137772/testReport)** for PR 32284 at commit [`0165bd6`](https://github.com/apache/spark/commit/0165bd670bba70384db8bdf16cab242fb8536822).
    * 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 commented on pull request #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


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


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


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


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


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


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


   LGTM


-- 
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 #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


   Merged to branch-3.0. Thank you, @sandeep-katta 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] SparkQA removed a comment on pull request #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

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


   **[Test build #137772 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137772/testReport)** for PR 32284 at commit [`0165bd6`](https://github.com/apache/spark/commit/0165bd670bba70384db8bdf16cab242fb8536822).


-- 
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 closed pull request #32284: [SPARK-35096][SQL][3.0] SchemaPruning should adhere spark.sql.caseSensitive config

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #32284:
URL: https://github.com/apache/spark/pull/32284


   


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