This is an automated email from the ASF dual-hosted git repository. richox pushed a commit to branch dev-v6.0.0-parallel-scan-kdev-build in repository https://gitbox.apache.org/repos/asf/auron.git
commit 186718c913945fb21119dd22e5cb8397948138e8 Author: zhangli20 <[email protected]> AuthorDate: Sat Mar 7 15:14:11 2026 +0800 disable string to decimal cast (https://team.corp.kuaishou.com/task/T10924138) --- pom.xml | 2 +- .../src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1a186ce6..b034ec28 100644 --- a/pom.xml +++ b/pom.xml @@ -416,7 +416,7 @@ <id>spark-3.5</id> <properties> <shimName>spark-3.5</shimName> - <pkgSuffix>-kwai-hotfix-rule-engine</pkgSuffix> + <pkgSuffix>-kwai-hotfix-decimal-cast</pkgSuffix> <shimPkg>spark-extension-shims-spark3</shimPkg> <javaVersion>1.8</javaVersion> <scalaVersion>2.12</scalaVersion> diff --git a/spark-extension/src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala b/spark-extension/src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala index 4a57d474..f798dcee 100644 --- a/spark-extension/src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala +++ b/spark-extension/src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala @@ -437,6 +437,8 @@ object NativeConverters extends Logging { case cast: Cast if !Seq(cast.dataType, cast.child.dataType).exists(t => t.isInstanceOf[TimestampType] || t.isInstanceOf[DateType]) => + assert(cast.child.dataType != StringType || !cast.dataType.isInstanceOf[DecimalType], + s"Cast from String to Decimal is not supported in native execution. Expression: ${cast}") buildExprNode { _.setTryCast( pb.PhysicalTryCastNode
