From f35cfa942fe4d6587228dedf11503a36e8588b9c Mon Sep 17 00:00:00 2001 From: Chang Chen Date: Mon, 29 Jul 2024 15:59:00 +0800 Subject: [PATCH] tpcds - pass 3.5 ut --- .../GlutenClickHouseTPCDSAbstractSuite.scala | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseTPCDSAbstractSuite.scala b/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseTPCDSAbstractSuite.scala index ad4d3b91affb8..6ca587bebc283 100644 --- a/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseTPCDSAbstractSuite.scala +++ b/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseTPCDSAbstractSuite.scala @@ -57,19 +57,22 @@ abstract class GlutenClickHouseTPCDSAbstractSuite } else { Seq("q" + "%d".format(queryNum)) } - val native = queryNum match { - case i if !isAqe && (i == 10 || i == 16 || i == 35 || i == 94) => - // q10, q35 smj + existence join - // q16 smj + left semi + not condition - // Q94 BroadcastHashJoin, LeftSemi, NOT condition - false - case i if isAqe && (i == 16 || i == 94) => - false - case _ => true - } + val native = !fallbackSets(isAqe).contains(queryNum) sqlNums.map((_, native)) }) + protected def fallbackSets(isAqe: Boolean): Set[Int] = { + val more = if (isSparkVersionGE("3.5")) Set(44, 67, 70) else Set.empty[Int] + + // q16 smj + left semi + not condition + // Q94 BroadcastHashJoin, LeftSemi, NOT condition + if (isAqe) { + Set(16, 94) | more + } else { + // q10, q35 smj + existence join + Set(10, 16, 35, 94) | more + } + } protected def excludedTpcdsQueries: Set[String] = Set( "q66" // inconsistent results ) @@ -82,7 +85,7 @@ abstract class GlutenClickHouseTPCDSAbstractSuite runTPCDSQuery(s._1, noFallBack = s._2) { df => } } } else { - val tag = if (s._2) "Native" else "Vanilla" + val tag = if (s._2) "Native" else "Fallback" test(s"TPCDS[$tag] ${s._1.toUpperCase()}") { runTPCDSQuery(s._1, noFallBack = s._2) { df => } }