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/12 08:25:30 UTC

[GitHub] [spark] AngersZhuuuu opened a new pull request #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

AngersZhuuuu opened a new pull request #32127:
URL: https://github.com/apache/spark/pull/32127


   ### What changes were proposed in this pull request?
   
   When we insert data into a partition table partition with empty DataFrame. We will call `PartitioningUtils.getPathFragment()`
   then to update this partition's metadata too.
   When we insert to a partition when partition value is `null`, it will throw exception like 
   ```
   [info]   java.lang.NullPointerException:
   [info]   at scala.collection.immutable.StringOps$.length$extension(StringOps.scala:51)
   [info]   at scala.collection.immutable.StringOps.length(StringOps.scala:51)
   [info]   at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:35)
   [info]   at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
   [info]   at scala.collection.immutable.StringOps.foreach(StringOps.scala:33)
   [info]   at org.apache.spark.sql.catalyst.catalog.ExternalCatalogUtils$.escapePathName(ExternalCatalogUtils.scala:69)
   [info]   at org.apache.spark.sql.catalyst.catalog.ExternalCatalogUtils$.getPartitionValueString(ExternalCatalogUtils.scala:126)
   [info]   at org.apache.spark.sql.execution.datasources.PartitioningUtils$.$anonfun$getPathFragment$1(PartitioningUtils.scala:354)
   [info]   at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)
   [info]   at scala.collection.Iterator.foreach(Iterator.scala:941)
   [info]   at scala.collection.Iterator.foreach$(Iterator.scala:941)
   [info]   at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
   [info]   at scala.collection.IterableLike.foreach(IterableLike.scala:74)
   [info]   at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
   ```
   `PartitioningUtils.getPathFragment()`  should support `null` value too
   
   ### Why are the changes needed?
   Fix bug
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Added UT
   


-- 
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] AngersZhuuuu commented on pull request #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


   FYI @MaxGekk 


-- 
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 #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


   **[Test build #137201 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137201/testReport)** for PR 32127 at commit [`63cf967`](https://github.com/apache/spark/commit/63cf96754259f386669687c7b58aab5f0c42826d).


-- 
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] MaxGekk commented on pull request #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


   cc @cloud-fan @HyukjinKwon @wangyum 


-- 
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 #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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






-- 
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] MaxGekk closed pull request #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


   


-- 
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] MaxGekk commented on pull request #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


   +1, LGTM. Merging to branch-3.1.
   Thank you @AngersZhuuuu and @HyukjinKwon @wangyum for your 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] AmplabJenkins commented on pull request #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


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


-- 
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 #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


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


-- 
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 #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


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


-- 
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 #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


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


-- 
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 #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


   **[Test build #137201 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137201/testReport)** for PR 32127 at commit [`63cf967`](https://github.com/apache/spark/commit/63cf96754259f386669687c7b58aab5f0c42826d).
    * 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 removed a comment on pull request #32127: [SPARK-34926][SQL][3.1] PartitioningUtils.getPathFragment() should respect partition value is null

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


   **[Test build #137201 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/137201/testReport)** for PR 32127 at commit [`63cf967`](https://github.com/apache/spark/commit/63cf96754259f386669687c7b58aab5f0c42826d).


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