JingsongLi opened a new pull request, #1117: URL: https://github.com/apache/paimon-rust/pull/1117
## What does this PR do? Align existing schema-evolution temporal casts with Java `CastExecutors`: - TIMESTAMP ↔ TIMESTAMP_LTZ uses the process local zone, with Java's earlier offset for overlaps and forward adjustment for gaps. - TIMESTAMP/TIMESTAMP_LTZ → DATE/TIME keeps Java's floor/modulo, signed DATE arithmetic and millisecond TIME representation. - DATE → TIMESTAMP_LTZ resolves local midnight, including skipped calendar dates. - BIGINT → TIMESTAMP_LTZ uses Java epoch-seconds and signed millisecond overflow semantics. - Cross-kind precision reduction happens after timezone conversion; submillisecond values are retained when the target supports them. These are casts already accepted by PyPaimon. Generic Arrow casts previously retained the UTC clock or treated BIGINT values as storage ticks. For example, under Asia/Shanghai, LTZ epoch 0 must become ordinary TIMESTAMP 08:00:00 and ordinary TIMESTAMP epoch 0 must become LTZ -28800000 milliseconds. The conversion executor lives in Rust core and is reused for nested ROW/ARRAY/MAP schema evolution. Existing temporal string casts share the local offset helper. No new public APIs or dependencies are added. Wide values use Java's initial wall offset/final Gregorian transition cycle instead of failing at a date library's range limit. This also handles valid local wall times whose UTC result crosses that limit. ## How was this tested? - Java golden outputs collected from the actual `TimestampToTimestampCastRule`, `TimestampToDateCastRule`, `TimestampToTimeCastRule`, `DateToTimestampCastRule` and `NumericPrimitiveToTimestamp` paths. - Core regressions cover DST gaps/overlaps, Apia's skipped day, negative values, signed integer limits, NULLs, slices, nanos and declared precision. - `cargo test -p paimon --lib arrow::`: 538 passed, 1 ignored. - `cargo +1.98.0 fmt --all -- --check`. - `cargo +1.98.0 clippy --locked --all-targets --workspace --features fulltext,vortex -- -D warnings`. - PyPaimon REST Native regressions verify append, PK and data-evolution tables, mixed old/new files, predicates, nested projections and selected MAP values under UTC, America/New_York and Asia/Shanghai. - Final new Native suite: 31 cases passed in each of UTC, America/New_York and Asia/Shanghai (73 native plans/reads, 49 native writes/commits per process). - Independent core/Python reviews completed; the discovered UTC-output library-boundary issue was fixed and revalidated against Java. -- 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]
