From 4c8b625fd1eb5343e950fa1a7307193dbbe5e3f1 Mon Sep 17 00:00:00 2001 From: zjuwangg Date: Thu, 7 Mar 2024 17:11:05 +0800 Subject: [PATCH] fix test failed --- .../io/glutenproject/execution/TestOperator.scala | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backends-velox/src/test/scala/io/glutenproject/execution/TestOperator.scala b/backends-velox/src/test/scala/io/glutenproject/execution/TestOperator.scala index 98306c8391bc3..53dd607e5d83e 100644 --- a/backends-velox/src/test/scala/io/glutenproject/execution/TestOperator.scala +++ b/backends-velox/src/test/scala/io/glutenproject/execution/TestOperator.scala @@ -1183,19 +1183,20 @@ class TestOperator extends VeloxWholeStageTransformerSuite { test("test roundrobine with sort") { // scalastyle:off - runQueryAndCompare("SELECT /*+ REPARTITION(3) */ * FROM lineitem") { + runQueryAndCompare("SELECT /*+ REPARTITION(3) */ l_orderkey, l_partkey FROM lineitem") { /* - ColumnarExchange RoundRobinPartitioning(3), REPARTITION_BY_NUM, [l_orderkey#16L, l_partkey#17L, l_suppkey#18L, l_linenumber#19, l_quantity#20, l_extendedprice#21, l_discount#22, l_tax#23, l_returnflag#24, l_linestatus#25, l_shipdate#26, l_commitdate#27, l_receiptdate#28, l_shipinstruct#29, l_shipmode#30, l_comment#31], [id=#131], [id=#131], [OUTPUT] List(l_orderkey:LongType, l_partkey:LongType, l_suppkey:LongType, l_linenumber:IntegerType, l_quantity:DecimalType(12,2), l_extendedprice:DecimalType(12,2), l_discount:DecimalType(12,2), l_tax:DecimalType(12,2), l_returnflag:StringType, l_linestatus:StringType, l_shipdate:DateType, l_commitdate:DateType, l_receiptdate:DateType, l_shipinstruct:StringType, l_shipmode:StringType, l_comment:StringType), [OUTPUT] List(l_orderkey:LongType, l_partkey:LongType, l_suppkey:LongType, l_linenumber:IntegerType, l_quantity:DecimalType(12,2), l_extendedprice:DecimalType(12,2), l_discount:DecimalType(12,2), l_tax:DecimalType(12,2), l_returnflag:StringType, l_linestatus:StringType, l_shipdate:DateType, l_commitdate:DateType, l_receiptdate:DateType, l_shipinstruct:StringType, l_shipmode:StringType, l_comment:StringType) + ColumnarExchange RoundRobinPartitioning(3), REPARTITION_BY_NUM, [l_orderkey#16L, l_partkey#17L) +- ^(2) SortExecTransformer [hash_partition_key#302 ASC NULLS FIRST], false, 0 - +- ^(2) ProjectExecTransformer [hash(l_orderkey#16L, l_partkey#17L, l_suppkey#18L, l_linenumber#19, l_quantity#20, l_extendedprice#21, l_discount#22, l_tax#23, l_returnflag#24, l_linestatus#25, l_shipdate#26, l_commitdate#27, l_receiptdate#28, l_shipinstruct#29, l_shipmode#30, l_comment#31, 42) AS hash_partition_key#302, l_orderkey#16L, l_partkey#17L, l_suppkey#18L, l_linenumber#19, l_quantity#20, l_extendedprice#21, l_discount#22, l_tax#23, l_returnflag#24, l_linestatus#25, l_shipdate#26, l_commitdate#27, l_receiptdate#28, l_shipinstruct#29, l_shipmode#30, l_comment#31] - +- ^(2) BatchScanExecTransformer[l_orderkey#16L, l_partkey#17L, l_suppkey#18L, l_linenumber#19, l_quantity#20, l_extendedprice#21, l_discount#22, l_tax#23, l_returnflag#24, l_linestatus#25, l_shipdate#26, l_commitdate#27, l_receiptdate#28, l_shipinstruct#29, l_shipmode#30, l_comment#31] ParquetScan DataFilters: [], Format: parquet, Location: InMemoryFileIndex(1 paths)[file:/home/wanggang.terry/gluten/backends-velox/target/scala-2.12/test..., PartitionFilters: [], PushedFilters: [], ReadSchema: struct, PushedFilters: [] RuntimeFilters: [] */ checkOperatorMatch[SortExecTransformer] } // scalastyle:on withSQLConf("spark.sql.execution.sortBeforeRepartition" -> "false") { - runQueryAndCompare("SELECT /*+ REPARTITION(3) */ * FROM lineitem") { + runQueryAndCompare(""""SELECT /*+ REPARTITION(3) */ + | l_orderkey, l_partkey FROM lineitem""".stripMargin) { df => { assert(getExecutedPlan(df).count(_.isInstanceOf[SortExecTransformer]) == 0)