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

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 348cca877f [spark] Fix the bug that the single bucket_key field name 
has special characters (#5439)
348cca877f is described below

commit 348cca877f527689e2c048743d6e57f571e29dd1
Author: Fengyuanshen <[email protected]>
AuthorDate: Tue Jun 17 15:31:45 2025 +0800

    [spark] Fix the bug that the single bucket_key field name has special 
characters (#5439)
---
 .../src/main/scala/org/apache/paimon/spark/PaimonScan.scala            | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonScan.scala
 
b/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonScan.scala
index 616c660255..6efdfe20f6 100644
--- 
a/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonScan.scala
+++ 
b/paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonScan.scala
@@ -21,6 +21,7 @@ package org.apache.paimon.spark
 import org.apache.paimon.predicate.Predicate
 import org.apache.paimon.table.{BucketMode, FileStoreTable, Table}
 import org.apache.paimon.table.source.{DataSplit, Split}
+import org.apache.paimon.utils.StringUtils
 
 import org.apache.spark.sql.PaimonUtils.fieldReference
 import org.apache.spark.sql.connector.expressions._
@@ -66,7 +67,7 @@ case class PaimonScan(
             case Some(num) =>
               val bucketKey = bucketSpec.getBucketKeys.get(0)
               if (requiredSchema.exists(f => conf.resolver(f.name, 
bucketKey))) {
-                Some(Expressions.bucket(num, bucketKey))
+                Some(Expressions.bucket(num, StringUtils.quote(bucketKey)))
               } else {
                 None
               }

Reply via email to