Skip to content

Commit

Permalink
fix due to #7263
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen committed Sep 19, 2024
1 parent 1a43af5 commit c670f08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
*/
package org.apache.spark.sql.execution.commands

import org.apache.gluten.GlutenConfig
import org.apache.gluten.backendsapi.clickhouse.CHBackend
import org.apache.gluten.backendsapi.clickhouse.CHConf
import org.apache.gluten.substrait.rel.LocalFilesBuilder
import org.apache.gluten.substrait.rel.LocalFilesNode.ReadFileFormat

Expand Down Expand Up @@ -54,8 +53,7 @@ case class GlutenCacheFilesCommand(
override def run(session: SparkSession): Seq[Row] = {
if (
!session.sparkContext.getConf.getBoolean(
s"${GlutenConfig.GLUTEN_CONFIG_PREFIX}${CHBackend.BACKEND_NAME}" +
s".runtime_config.gluten_cache.local.enabled",
CHConf.runtimeConfig("gluten_cache.local.enabled"),
defaultValue = false)
) {
return Seq(Row(false, "Config `gluten_cache.local.enabled` is disabled."))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.gluten.execution.mergetree

import org.apache.gluten.backendsapi.clickhouse.CHConf
import org.apache.gluten.execution.{FileSourceScanExecTransformer, GlutenClickHouseTPCHAbstractSuite}

import org.apache.spark.SparkConf
Expand Down Expand Up @@ -592,7 +593,7 @@ class GlutenClickHouseMergeTreeCacheDataSuite
}

test("test disable cache files return") {
withSQLConf(s"$CH_CONFIG_PREFIX.gluten_cache.local.enabled" -> "false") {
withSQLConf(CHConf.runtimeConfig("gluten_cache.local.enabled") -> "false") {
runSql(
s"CACHE FILES select * from '$HDFS_URL_ENDPOINT/tpch-data/lineitem'",
noFallBack = false) {
Expand Down

0 comments on commit c670f08

Please sign in to comment.