Skip to content

Commit 880599e

Browse files
committed
Fix CometReadBenchmark.
1 parent 8091a81 commit 880599e

File tree

1 file changed

+71
-71
lines changed

1 file changed

+71
-71
lines changed

spark/src/test/scala/org/apache/spark/sql/benchmark/CometReadBenchmark.scala

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -672,26 +672,26 @@ class CometReadBaseBenchmark extends CometBenchmarkBase {
672672
}
673673

674674
override def runCometBenchmark(mainArgs: Array[String]): Unit = {
675-
// runBenchmarkWithTable("Parquet Reader", 1024 * 1024 * 15) { v =>
676-
// Seq(
677-
// BooleanType,
678-
// ByteType,
679-
// ShortType,
680-
// IntegerType,
681-
// LongType,
682-
// FloatType,
683-
// DoubleType,
684-
// StringType).foreach { dataType =>
685-
// readerBenchmark(v, dataType)
686-
// }
687-
// }
688-
//
689-
// runBenchmarkWithTable("SQL Single Numeric Column Scan", 1024 * 1024 * 128) { v =>
690-
// Seq(BooleanType, ByteType, ShortType, IntegerType, LongType, FloatType, DoubleType)
691-
// .foreach { dataType =>
692-
// numericScanBenchmark(v, dataType)
693-
// }
694-
// }
675+
runBenchmarkWithTable("Parquet Reader", 1024 * 1024 * 15) { v =>
676+
Seq(
677+
BooleanType,
678+
ByteType,
679+
ShortType,
680+
IntegerType,
681+
LongType,
682+
FloatType,
683+
DoubleType,
684+
StringType).foreach { dataType =>
685+
readerBenchmark(v, dataType)
686+
}
687+
}
688+
689+
runBenchmarkWithTable("SQL Single Numeric Column Scan", 1024 * 1024 * 128) { v =>
690+
Seq(BooleanType, ByteType, ShortType, IntegerType, LongType, FloatType, DoubleType)
691+
.foreach { dataType =>
692+
numericScanBenchmark(v, dataType)
693+
}
694+
}
695695

696696
runBenchmarkWithTable("SQL Single Numeric Iceberg Column Scan", 1024 * 1024 * 128) { v =>
697697
Seq(BooleanType, ByteType, ShortType, IntegerType, LongType, FloatType, DoubleType)
@@ -700,57 +700,57 @@ class CometReadBaseBenchmark extends CometBenchmarkBase {
700700
}
701701
}
702702

703-
// runBenchmarkWithTable("SQL Single Numeric Encrypted Column Scan", 1024 * 1024 * 128) { v =>
704-
// Seq(BooleanType, ByteType, ShortType, IntegerType, LongType, FloatType, DoubleType)
705-
// .foreach { dataType =>
706-
// encryptedScanBenchmark(v, dataType)
707-
// }
708-
// }
709-
//
710-
// runBenchmark("SQL Decimal Column Scan") {
711-
// withTempTable(tbl) {
712-
// import spark.implicits._
713-
// spark.range(1024 * 1024 * 15).map(_ => Random.nextInt).createOrReplaceTempView(tbl)
714-
//
715-
// Seq((5, 2), (18, 4), (20, 8)).foreach { case (precision, scale) =>
716-
// decimalScanBenchmark(1024 * 1024 * 15, precision, scale)
717-
// }
718-
// }
719-
// }
720-
//
721-
// runBenchmarkWithTable("String Scan with Dictionary", 1024 * 1024 * 15) { v =>
722-
// stringWithDictionaryScanBenchmark(v)
723-
// }
724-
//
725-
// runBenchmarkWithTable("Numeric Filter Scan", 1024 * 1024 * 10) { v =>
726-
// for (fractionOfZeros <- List(0.0, 0.50, 0.95)) {
727-
// numericFilterScanBenchmark(v, fractionOfZeros)
728-
// }
729-
// }
730-
//
731-
// runBenchmarkWithTable("String with Nulls Scan", 1024 * 1024 * 10) { v =>
732-
// for (fractionOfNulls <- List(0.0, 0.50, 0.95)) {
733-
// stringWithNullsScanBenchmark(v, fractionOfNulls)
734-
// }
735-
// }
736-
//
737-
// runBenchmarkWithTable("Single Column Scan From Wide Columns", 1024 * 1024 * 1) { v =>
738-
// for (columnWidth <- List(10, 50, 100)) {
739-
// columnsBenchmark(v, columnWidth)
740-
// }
741-
// }
742-
//
743-
// runBenchmarkWithTable("Large String Filter Scan", 1024 * 1024) { v =>
744-
// for (fractionOfZeros <- List(0.0, 0.50, 0.999)) {
745-
// largeStringFilterScanBenchmark(v, fractionOfZeros)
746-
// }
747-
// }
748-
//
749-
// runBenchmarkWithTable("Sorted Lg Str Filter Scan", 1024 * 1024) { v =>
750-
// for (fractionOfZeros <- List(0.0, 0.50, 0.999)) {
751-
// sortedLgStrFilterScanBenchmark(v, fractionOfZeros)
752-
// }
753-
// }
703+
runBenchmarkWithTable("SQL Single Numeric Encrypted Column Scan", 1024 * 1024 * 128) { v =>
704+
Seq(BooleanType, ByteType, ShortType, IntegerType, LongType, FloatType, DoubleType)
705+
.foreach { dataType =>
706+
encryptedScanBenchmark(v, dataType)
707+
}
708+
}
709+
710+
runBenchmark("SQL Decimal Column Scan") {
711+
withTempTable(tbl) {
712+
import spark.implicits._
713+
spark.range(1024 * 1024 * 15).map(_ => Random.nextInt).createOrReplaceTempView(tbl)
714+
715+
Seq((5, 2), (18, 4), (20, 8)).foreach { case (precision, scale) =>
716+
decimalScanBenchmark(1024 * 1024 * 15, precision, scale)
717+
}
718+
}
719+
}
720+
721+
runBenchmarkWithTable("String Scan with Dictionary", 1024 * 1024 * 15) { v =>
722+
stringWithDictionaryScanBenchmark(v)
723+
}
724+
725+
runBenchmarkWithTable("Numeric Filter Scan", 1024 * 1024 * 10) { v =>
726+
for (fractionOfZeros <- List(0.0, 0.50, 0.95)) {
727+
numericFilterScanBenchmark(v, fractionOfZeros)
728+
}
729+
}
730+
731+
runBenchmarkWithTable("String with Nulls Scan", 1024 * 1024 * 10) { v =>
732+
for (fractionOfNulls <- List(0.0, 0.50, 0.95)) {
733+
stringWithNullsScanBenchmark(v, fractionOfNulls)
734+
}
735+
}
736+
737+
runBenchmarkWithTable("Single Column Scan From Wide Columns", 1024 * 1024 * 1) { v =>
738+
for (columnWidth <- List(10, 50, 100)) {
739+
columnsBenchmark(v, columnWidth)
740+
}
741+
}
742+
743+
runBenchmarkWithTable("Large String Filter Scan", 1024 * 1024) { v =>
744+
for (fractionOfZeros <- List(0.0, 0.50, 0.999)) {
745+
largeStringFilterScanBenchmark(v, fractionOfZeros)
746+
}
747+
}
748+
749+
runBenchmarkWithTable("Sorted Lg Str Filter Scan", 1024 * 1024) { v =>
750+
for (fractionOfZeros <- List(0.0, 0.50, 0.999)) {
751+
sortedLgStrFilterScanBenchmark(v, fractionOfZeros)
752+
}
753+
}
754754
}
755755
}
756756

0 commit comments

Comments
 (0)