From c670f08f18db25420fa970df11eb9373047c08f0 Mon Sep 17 00:00:00 2001 From: Chang Chen Date: Thu, 19 Sep 2024 19:09:11 +0800 Subject: [PATCH] fix due to https://github.com/apache/incubator-gluten/pull/7263 --- .../sql/execution/commands/GlutenCacheFilesCommand.scala | 6 ++---- .../mergetree/GlutenClickHouseMergeTreeCacheDataSuite.scala | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/backends-clickhouse/src/main/scala/org/apache/spark/sql/execution/commands/GlutenCacheFilesCommand.scala b/backends-clickhouse/src/main/scala/org/apache/spark/sql/execution/commands/GlutenCacheFilesCommand.scala index b2640df789e9..aec414f05596 100644 --- a/backends-clickhouse/src/main/scala/org/apache/spark/sql/execution/commands/GlutenCacheFilesCommand.scala +++ b/backends-clickhouse/src/main/scala/org/apache/spark/sql/execution/commands/GlutenCacheFilesCommand.scala @@ -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 @@ -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.")) diff --git a/backends-clickhouse/src/test/scala/org/apache/gluten/execution/mergetree/GlutenClickHouseMergeTreeCacheDataSuite.scala b/backends-clickhouse/src/test/scala/org/apache/gluten/execution/mergetree/GlutenClickHouseMergeTreeCacheDataSuite.scala index e2624e3f5dee..decd27099ea7 100644 --- a/backends-clickhouse/src/test/scala/org/apache/gluten/execution/mergetree/GlutenClickHouseMergeTreeCacheDataSuite.scala +++ b/backends-clickhouse/src/test/scala/org/apache/gluten/execution/mergetree/GlutenClickHouseMergeTreeCacheDataSuite.scala @@ -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 @@ -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) {