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 2022/07/18 08:25:44 UTC
[GitHub] [spark] cloud-fan commented on a diff in pull request #37214: [SPARK-39806][SQL] Accessing `_metadata` on partitioned table can crash a query
cloud-fan commented on code in PR #37214:
URL: https://github.com/apache/spark/pull/37214#discussion_r923084409
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileScanRDD.scala:
##########
@@ -70,6 +70,7 @@ class FileScanRDD(
readFunction: (PartitionedFile) => Iterator[InternalRow],
@transient val filePartitions: Seq[FilePartition],
val readDataSchema: StructType,
+ val partitionSchema: StructType = new StructType(),
Review Comment:
Instead of passing two parameters, I think we just need a `readSchema: StrucType`. It's only used to create a projection to add metadata 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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