Skip to content

Commit

Permalink
[CH] enable replaceSortAggWithHashAgg
Browse files Browse the repository at this point in the history
  • Loading branch information
exmy committed Nov 9, 2023
1 parent 451eb66 commit df9ce75
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 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 @@ -292,8 +292,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 df9ce75

Please sign in to comment.