JingsongLi opened a new pull request, #1115:
URL: https://github.com/apache/paimon-rust/pull/1115

   ## What changes
   
   Align the Native reader's existing temporal-to-character schema evolution 
with Java:
   
   - Format TIME with DateTimeUtils' precision loop, including `.0` for whole 
seconds and negative-millisecond normalization.
   - Format TIMESTAMP with a space separator and its declared minimum fraction 
width, retaining significant nanoseconds.
   - Format TIMESTAMP_LTZ in the process local time zone without an ISO zone 
suffix.
   - Apply Java CHAR padding and VARCHAR truncation to scalar temporal casts.
   - Reuse the scalar conversion inside ARRAY/MAP/ROW string rendering, 
preserving NULL containers and nested NULLs.
   - Share temporal formatting with non-legacy partition paths and fix TIME's 
whole-second partition text.
   - Preserve Java's signed epoch-day narrowing, four-digit year rendering, and 
millisecond wrapping for ordinary timestamps outside datetime ranges.
   
   The behavior lives in Rust core; the Python bindings need no new API or 
conversion logic. Legacy partition formatting is unchanged. No dependencies are 
added.
   
   ## Evidence
   
   An existing-capability probe exercised 85 Python-supported atomic schema 
changes through REST tables. It identified TIME/TIMESTAMP/LTZ string 
differences. Re-running the same probe after these changes found no mismatches.
   
   Java references: TimestampToStringCastRule, TimeToStringCastRule, 
DateTimeUtils, BinaryStringUtils, and Timestamp.toLocalDateTime. Actual Java 
CastExecutors were also exercised for precision, bounded strings, time zones, 
pre-epoch timestamps and wide years.
   
   ## Verification
   
   - 73 focused Rust tests: evolution_string, nested_evolution and 
partition_utils.
   - cargo +1.98.0 fmt --all -- --check.
   - cargo +1.98.0 clippy --locked --all-targets --workspace --features 
fulltext,vortex -- -D warnings.
   - Rebuilt Python extension and ran 195 REST schema-evolution tests with 
Native planning/reading/writing/committing enabled: 447 Native reads, 261 
writes and commits.
   - LTZ REST cases also passed in America/New_York and Asia/Shanghai, 
including winter/summer instants.
   
   Python has a companion PR with Java-aligned pure-Python casts and cross-path 
regressions. Its Native CI will require this Rust change to be merged first.
   


-- 
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]

Reply via email to