This is an automated email from the ASF dual-hosted git repository.
wombatukun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new f8ae5f5f8ec Revert "[HUDI-4818] Update the data type to string to
avoid type convertion failure (#12165)" (#12218)
f8ae5f5f8ec is described below
commit f8ae5f5f8ecbcc992ce312fa41fc5c42e3c93e0c
Author: Vova Kolmakov <[email protected]>
AuthorDate: Thu Nov 7 14:19:05 2024 +0700
Revert "[HUDI-4818] Update the data type to string to avoid type convertion
failure (#12165)" (#12218)
This reverts commit 3d81ea0a313bba1902065de87de4ee2be38538e3.
Co-authored-by: Vova Kolmakov <[email protected]>
---
.../spark/sql/execution/datasources/Spark3ParsePartitionUtil.scala | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git
a/hudi-spark-datasource/hudi-spark3-common/src/main/scala/org/apache/spark/sql/execution/datasources/Spark3ParsePartitionUtil.scala
b/hudi-spark-datasource/hudi-spark3-common/src/main/scala/org/apache/spark/sql/execution/datasources/Spark3ParsePartitionUtil.scala
index 3860df13612..2632a37d017 100644
---
a/hudi-spark-datasource/hudi-spark3-common/src/main/scala/org/apache/spark/sql/execution/datasources/Spark3ParsePartitionUtil.scala
+++
b/hudi-spark-datasource/hudi-spark3-common/src/main/scala/org/apache/spark/sql/execution/datasources/Spark3ParsePartitionUtil.scala
@@ -70,11 +70,7 @@ object Spark3ParsePartitionUtil extends
SparkParsePartitionUtil {
castPartValueToDesiredType(typedValue.dataType, typedValue.value,
tz.toZoneId)
} catch {
case NonFatal(_) =>
- // If the exception happens, there was some transformation on
the original value.
- // String value should be universal type for type casting.
- if (userSpecifiedDataTypes.contains(columnName)) {
- castPartValueToDesiredType(StringType, typedValue.value,
tz.toZoneId)
- } else if (validatePartitionValues) {
+ if (validatePartitionValues) {
throw new RuntimeException(s"Failed to cast value
`${typedValue.value}` to " +
s"`${typedValue.dataType}` for partition column
`$columnName`")
} else null