peter-toth commented on code in PR #59639:
URL: https://github.com/apache/spark/pull/59639#discussion_r4350563105


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetStorageFilterSuite.scala:
##########
@@ -197,18 +198,24 @@ class ParquetStorageFilterSuite extends QueryTest with 
SharedSparkSession
       s"a cap one byte under it must give splicing up; got $underCharge 
against $uncapped")
   }
 
-  // Reads `path` whole through the format under a splice cap and a batch 
size, and returns the rows
-  // it emitted with the bytes it transferred.
+  // Reads `path` whole through the format under a splice cap and a batch 
size, as a task of
+  // `context` if one is given, and returns the rows it emitted with the bytes 
it transferred.
   private def readUnderCap(
       path: String,
       schema: StructType,
       storageFilters: Seq[Expression],
       maxSplicedBytes: String,
       batchSize: Int,
-      metrics: Map[String, SQLMetric] = metricMap()): (Int, Long) = 
withSQLConf(
+      metrics: Map[String, SQLMetric] = metricMap(),
+      context: Option[TaskContext] = None): (Int, Long) = withSQLConf(
       SQLConf.PARQUET_STORAGE_FILTER_PUSHDOWN_MAX_SPLICED_ROW_GROUP_BYTES.key 
-> maxSplicedBytes,
       SQLConf.PARQUET_VECTORIZED_READER_BATCH_SIZE.key -> batchSize.toString) {
-    readCounting(path, formatReader(schema, Nil, storageFilters, 
countingHadoopConf(), metrics))
+    def read(): (Int, Long) = readCounting(
+      path, formatReader(schema, Nil, storageFilters, countingHadoopConf(), 
metrics))
+    context match {

Review Comment:
   Done in 
[09b8b2186e3](https://github.com/apache/spark/pull/59639/commits/09b8b2186e31b49f1d5d864601739f989294f582).
 Both are `context.fold(read())(asTask(_)(read()))` now.



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

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