This is an automated email from the ASF dual-hosted git repository.

LuciferYang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 946d668821 [GLUTEN-13766][CH] Remove unused members from 
CHPartitionsUtil (#13767)
946d668821 is described below

commit 946d6688218f2ce1183fe4e84c022ef03f9dbb87
Author: YangJie <[email protected]>
AuthorDate: Thu Nov 26 08:36:37 2026 -0500

    [GLUTEN-13766][CH] Remove unused members from CHPartitionsUtil (#13767)
    
    ## What changes are proposed in this pull request?
    
    Removes members of `CHPartitionsUtil` that are never used: the constructor 
parameters `requiredSchema`, `output` and `disableBucketedScan`, and the 
private method `toAttribute`, which was the only reader of `output` and has no 
callers. The one construction site in `CHTransformerApi.genPartitionSeq` stops 
passing them. `genPartitionSeq` itself keeps its parameters, since 
`TransformerApi` defines them and the MergeTree branch still uses `output` and 
`disableBucketedScan`.
    
    No behavior change.
    
    Fixes #13766.
    
    ## How was this patch tested?
    
    No new tests, since nothing observable changes.
    
    ## Was this patch authored or co-authored using generative AI tooling?
    
    Yes. Generated-by: Claude Opus.
---
 .../gluten/backendsapi/clickhouse/CHTransformerApi.scala      |  5 +----
 .../main/scala/org/apache/gluten/utils/CHPartitionsUtil.scala | 11 +----------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git 
a/backends-clickhouse/src/main/scala/org/apache/gluten/backendsapi/clickhouse/CHTransformerApi.scala
 
b/backends-clickhouse/src/main/scala/org/apache/gluten/backendsapi/clickhouse/CHTransformerApi.scala
index ddc857182f..580e0ee162 100644
--- 
a/backends-clickhouse/src/main/scala/org/apache/gluten/backendsapi/clickhouse/CHTransformerApi.scala
+++ 
b/backends-clickhouse/src/main/scala/org/apache/gluten/backendsapi/clickhouse/CHTransformerApi.scala
@@ -82,13 +82,10 @@ class CHTransformerApi extends TransformerApi with Logging {
         // Generate FilePartition for Parquet
         CHPartitionsUtil(
           relation,
-          requiredSchema,
           selectedPartitions,
-          output,
           bucketedScan,
           optionalBucketSet,
-          optionalNumCoalescedBuckets,
-          disableBucketedScan).genPartitionSeq()
+          optionalNumCoalescedBuckets).genPartitionSeq()
     }
   }
 
diff --git 
a/backends-clickhouse/src/main/scala/org/apache/gluten/utils/CHPartitionsUtil.scala
 
b/backends-clickhouse/src/main/scala/org/apache/gluten/utils/CHPartitionsUtil.scala
index 6eaab68158..809275c787 100644
--- 
a/backends-clickhouse/src/main/scala/org/apache/gluten/utils/CHPartitionsUtil.scala
+++ 
b/backends-clickhouse/src/main/scala/org/apache/gluten/utils/CHPartitionsUtil.scala
@@ -21,9 +21,7 @@ import org.apache.gluten.sql.shims.SparkShimLoader
 
 import org.apache.spark.Partition
 import org.apache.spark.internal.Logging
-import org.apache.spark.sql.catalyst.expressions.Attribute
 import org.apache.spark.sql.execution.datasources._
-import org.apache.spark.sql.types.StructType
 import org.apache.spark.util.SparkResourceUtil
 import org.apache.spark.util.collection.BitSet
 
@@ -33,13 +31,10 @@ import scala.collection.mutable.ArrayBuffer
 
 case class CHPartitionsUtil(
     relation: HadoopFsRelation,
-    requiredSchema: StructType,
     selectedPartitions: Array[PartitionDirectory],
-    output: Seq[Attribute],
     bucketedScan: Boolean,
     optionalBucketSet: Option[BitSet],
-    optionalNumCoalescedBuckets: Option[Int],
-    disableBucketedScan: Boolean)
+    optionalNumCoalescedBuckets: Option[Int])
   extends Logging {
 
   def genPartitionSeq(): Seq[Partition] = {
@@ -179,8 +174,4 @@ case class CHPartitionsUtil(
     closePartition()
     partitions.toSeq
   }
-
-  private def toAttribute(colName: String): Option[Attribute] = {
-    output.find(_.name == colName)
-  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to