cloud-fan commented on a change in pull request #29804:
URL: https://github.com/apache/spark/pull/29804#discussion_r494851172



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
##########
@@ -348,20 +352,25 @@ case class FileSourceScanExec(
         "DataFilters" -> seqToString(dataFilters),
         "Location" -> locationDesc)
 
-    val withSelectedBucketsCount = relation.bucketSpec.map { spec =>
-      val numSelectedBuckets = optionalBucketSet.map { b =>
-        b.cardinality()
+    // TODO(SPARK-32986): Add bucketed scan info in explain output of 
FileSourceScanExec
+    if (bucketedScan) {
+      val withSelectedBucketsCount = relation.bucketSpec.map { spec =>

Review comment:
       nit: instead of writing
   ```
   val withSelectedBucketsCount =  some_code
   withSelectedBucketsCount
   ```
   we can just write `some_code`




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to