You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2026/03/13 02:10:08 UTC
(kyuubi) branch master updated: [KYUUBI #7350] Make TPC-H/DS connector compatible with Spark 4.2
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 588efc7d70 [KYUUBI #7350] Make TPC-H/DS connector compatible with Spark 4.2
588efc7d70 is described below
commit 588efc7d700d109251341a6f7ffbbef748201650
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Fri Mar 13 10:10:00 2026 +0800
[KYUUBI #7350] Make TPC-H/DS connector compatible with Spark 4.2
### Why are the changes needed?
Adapt to SPARK-54870, which added a new arg to case class `CharType`/`VarCharType`
### How was this patch tested?
We don't have Spark 4.2 CI coverage yet, so CI only ensures it won't breaking for older Spark versions.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #7350 from pan3793/tpc-spark-4.2.
Closes #7350
b16d00f83 [Cheng Pan] TPC H/DS connector compatible with Spark 4.2
Authored-by: Cheng Pan <ch...@apache.org>
Signed-off-by: Cheng Pan <ch...@apache.org>
---
.../apache/kyuubi/spark/connector/tpcds/KyuubiTPCDSResults.scala | 4 ++--
.../org/apache/kyuubi/spark/connector/tpch/TPCHBatchScan.scala | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/extensions/spark/kyuubi-spark-connector-tpcds/src/main/scala/org/apache/kyuubi/spark/connector/tpcds/KyuubiTPCDSResults.scala b/extensions/spark/kyuubi-spark-connector-tpcds/src/main/scala/org/apache/kyuubi/spark/connector/tpcds/KyuubiTPCDSResults.scala
index b119190091..8b530db4c3 100644
--- a/extensions/spark/kyuubi-spark-connector-tpcds/src/main/scala/org/apache/kyuubi/spark/connector/tpcds/KyuubiTPCDSResults.scala
+++ b/extensions/spark/kyuubi-spark-connector-tpcds/src/main/scala/org/apache/kyuubi/spark/connector/tpcds/KyuubiTPCDSResults.scala
@@ -144,8 +144,8 @@ class KyuubiResultsIterator(
case (Some(v: Long), DateType) =>
RebaseDateTime.rebaseJulianToGregorianDays(v.toInt) - DateTimeUtils.JULIAN_DAY_OF_EPOCH
case (Some(v), StringType) => UTF8String.fromString(v.toString)
- case (Some(v), CharType(_)) => UTF8String.fromString(v.toString)
- case (Some(v), VarcharType(_)) => UTF8String.fromString(v.toString)
+ case (Some(v), _: CharType) => UTF8String.fromString(v.toString)
+ case (Some(v), _: VarcharType) => UTF8String.fromString(v.toString)
case (Some(v: TPCDSDecimal), t: DecimalType) =>
Decimal(v.getNumber, t.precision, t.scale)
case (Some(v: Int), t: DecimalType) =>
diff --git a/extensions/spark/kyuubi-spark-connector-tpch/src/main/scala/org/apache/kyuubi/spark/connector/tpch/TPCHBatchScan.scala b/extensions/spark/kyuubi-spark-connector-tpch/src/main/scala/org/apache/kyuubi/spark/connector/tpch/TPCHBatchScan.scala
index 63ff82b7a3..65ab38eb52 100644
--- a/extensions/spark/kyuubi-spark-connector-tpch/src/main/scala/org/apache/kyuubi/spark/connector/tpch/TPCHBatchScan.scala
+++ b/extensions/spark/kyuubi-spark-connector-tpch/src/main/scala/org/apache/kyuubi/spark/connector/tpch/TPCHBatchScan.scala
@@ -135,11 +135,11 @@ class TPCHPartitionReader(
case (value, IntegerType) => rowAny += value.toInt
case (value, LongType) => rowAny += value.toLong
case (value, DoubleType) => rowAny += value.toDouble
- case (value, DateType) => rowAny += LocalDate.parse(formatDate(value.toInt), dateFmt)
- .toEpochDay.toInt
+ case (value, DateType) =>
+ rowAny += LocalDate.parse(formatDate(value.toInt), dateFmt).toEpochDay.toInt
case (value, StringType) => rowAny += UTF8String.fromString(value)
- case (value, CharType(_)) => rowAny += UTF8String.fromString(value)
- case (value, VarcharType(_)) => rowAny += UTF8String.fromString(value)
+ case (value, _: CharType) => rowAny += UTF8String.fromString(value)
+ case (value, _: VarcharType) => rowAny += UTF8String.fromString(value)
case (value, DecimalType()) => rowAny += Decimal(value)
case (value, dt) => throw new IllegalArgumentException(s"value: $value, type: $dt")
}