Skip to content

Commit

Permalink
fix compiler warning: a pure expression does nothing in statement pos…
Browse files Browse the repository at this point in the history
…ition
  • Loading branch information
andygrove committed Jun 12, 2024
1 parent 2b14c6d commit f24fca4
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions spark/src/test/scala/org/apache/spark/sql/CometTestBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,14 @@ abstract class CometTestBase
protected def checkCometOperators(plan: SparkPlan, excludedClasses: Class[_]*): Unit = {
val wrapped = wrapCometRowToColumnar(plan)
wrapped.foreach {
case _: CometScanExec | _: CometBatchScanExec => true
case _: CometSinkPlaceHolder | _: CometScanWrapper => false
case _: CometRowToColumnarExec => false
case _: CometExec | _: CometShuffleExchangeExec => true
case _: CometBroadcastExchangeExec => true
case _: WholeStageCodegenExec | _: ColumnarToRowExec | _: InputAdapter => true
case _: CometScanExec | _: CometBatchScanExec =>
case _: CometSinkPlaceHolder | _: CometScanWrapper =>
case _: CometRowToColumnarExec =>
case _: CometExec | _: CometShuffleExchangeExec =>
case _: CometBroadcastExchangeExec =>
case _: WholeStageCodegenExec | _: ColumnarToRowExec | _: InputAdapter =>
case op =>
if (excludedClasses.exists(c => c.isAssignableFrom(op.getClass))) {
true
} else {
if (!excludedClasses.exists(c => c.isAssignableFrom(op.getClass))) {
assert(
false,
s"Expected only Comet native operators, but found ${op.nodeName}.\n" +
Expand Down

0 comments on commit f24fca4

Please sign in to comment.