bozhang2820 commented on a change in pull request #35432:
URL: https://github.com/apache/spark/pull/35432#discussion_r802237425
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/DataSourceScanExecRedactionSuite.scala
##########
@@ -244,4 +244,33 @@ class DataSourceV2ScanExecRedactionSuite extends
DataSourceScanRedactionTest {
}
}
}
+
+ test("SPARK-37585: test input metrics for DSV2 with output limits") {
Review comment:
Sure, but should I move the other related tests together in this PR as
well?
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceRDD.scala
##########
@@ -126,14 +127,9 @@ private class MetricsHandler extends Logging with
Serializable {
private abstract class MetricsIterator[I](iter: Iterator[I]) extends
Iterator[I] {
protected val metricsHandler = new MetricsHandler
- override def hasNext: Boolean = {
- if (iter.hasNext) {
- true
- } else {
- metricsHandler.updateMetrics(0, force = true)
- false
- }
- }
+ override def hasNext: Boolean = iter.hasNext
Review comment:
Sure.
--
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]