rangareddy commented on issue #17054: URL: https://github.com/apache/hudi/issues/17054#issuecomment-5066302781
This issue was reviewed as part of the JIRA-migrated backlog triage. Findings: Reproduced on Hudi 1.0.2 (Spark 3.4.4). Using `CustomKeyGenerator` with a `TIMESTAMP` partition segment (`part_country:simple,part_date:timestamp`) where the partition source column `part_date` is declared `BIGINT` and `hive_style_partitioning=false`, the initial writes succeed but a subsequent UPDATE/read fails with exactly the reported error: `Failed to cast value `2025-06-06` to `LongType` for partition column `part_date``. Root cause is in the read-side partition parsing: `SparkParsePartitionUtil.castPartValueToDesiredType` does `case LongType => JLong.parseLong(value)`, but the timestamp keygen has written the partition value as the formatted date string `2025-06-06`, which is not a valid long. This code path is unchanged on current master, so the bug is still present on the latest version, matching your report across 0.12.x-1.0.2. Disposition: confirmed valid bug on current master. The fix (reconciling the timestamp-formatted partition value with the declared numeric partition column type on the read path) is larger than a local patch. Keeping this open and tracking it for a fix. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
