Skip to content

Commit

Permalink
[CH] enable replaceSortAggWithHashAgg
Browse files Browse the repository at this point in the history
  • Loading branch information
exmy committed Dec 11, 2023
1 parent fb3bc84 commit 4a9ccba
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class GlutenClickHouseFileFormatSuite
)
}

test("read data from csv file format witsh agg") {
test("read data from csv file format with agg") {
val filePath = basePath + "/csv_test_agg.csv"
val csvFileFormat = "csv"
val sql =
Expand All @@ -214,8 +214,7 @@ class GlutenClickHouseFileFormatSuite
case f: FileSourceScanExecTransformer => f
}
assert(csvFileScan.size == 1)
},
noFallBack = false
}
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class GlutenClickHouseTPCHColumnarShuffleParquetAQESuite
| l_returnflag,
| l_linestatus
|""".stripMargin
runQueryAndCompare(sql, noFallBack = false) { df => }
runQueryAndCompare(sql) { df => }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ object BackendSettings extends BackendSettingsApi {
override def removeHashColumnFromColumnarShuffleExchangeExec(): Boolean = true
override def rescaleDecimalLiteral(): Boolean = true

override def replaceSortAggWithHashAgg: Boolean = GlutenConfig.getConf.forceToUseHashAgg

/** Get the config prefix for each backend */
override def getBackendConfigPrefix(): String =
GlutenConfig.GLUTEN_CONFIG_PREFIX + VeloxBackend.BACKEND_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ trait BackendSettingsApi {
* Whether to replace sort agg with hash agg., e.g., sort agg will be used in spark's planning for
* string type input.
*/
def replaceSortAggWithHashAgg: Boolean = false
def replaceSortAggWithHashAgg: Boolean = GlutenConfig.getConf.forceToUseHashAgg

/** Get the config prefix for each backend */
def getBackendConfigPrefix: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ object FallbackUtil extends Logging with AdaptiveSparkPlanHelper {
}
}

if (!fallbackOperator.isEmpty) {
if (fallbackOperator.nonEmpty) {
fallbackOperator.foreach(operator => log.info(s"gluten fallback operator:{$operator}"))
}
return fallbackOperator.nonEmpty
fallbackOperator.nonEmpty
}
}

0 comments on commit 4a9ccba

Please sign in to comment.