File tree Expand file tree Collapse file tree
spark/src/test/scala/org/apache/comet/exec Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2210,9 +2210,11 @@ class CometExecSuite extends CometTestBase {
22102210 }
22112211
22122212 test(" Native_datafusion reports correct files and bytes scanned" ) {
2213+ val inputFiles = 2
2214+
22132215 withTempDir { dir =>
22142216 val path = new java.io.File (dir, " test_metrics" ).getAbsolutePath
2215- spark.range(100 ).repartition(2 ).write.mode(" overwrite" ).parquet(path)
2217+ spark.range(100 ).repartition(inputFiles ).write.mode(" overwrite" ).parquet(path)
22162218
22172219 withSQLConf(
22182220 CometConf .COMET_ENABLED .key -> " true" ,
@@ -2236,8 +2238,8 @@ class CometExecSuite extends CometTestBase {
22362238
22372239 val numFiles = scanNode.metrics(" numFiles" ).value
22382240 assert(
2239- numFiles == 2 ,
2240- s " Expected exactly 2 files to be scanned, but got metrics reporting $numFiles" )
2241+ numFiles == inputFiles ,
2242+ s " Expected exactly $inputFiles files to be scanned, but got metrics reporting $numFiles" )
22412243 }
22422244 }
22432245 }
You can’t perform that action at this time.
0 commit comments