sam-1112 opened a new pull request, #7770:
URL: https://github.com/apache/datafusion-comet/pull/7770

   ## Which issue does this PR close?
   
   Closes #7047.
   
   ## Rationale for this change
   
   The native Parquet writer always writes proleptic Gregorian values and does 
not enforce `EXCEPTION`, allowing ancient datetime values that Spark rejects.
   
   Spark version footer metadata is already provided by #7053. This PR 
completes the write-mode correctness fix by falling back to Spark for 
unsupported rebase policies.
   
   ## What changes are included in this PR?
   
   - Apply a shared schema-aware fallback check to both 
`DataWritingCommandExec` and `WriteFilesExec`.
   - Fall back for applicable `LEGACY` and `EXCEPTION` policies, including 
datetime fields nested in structs, arrays, and map keys or values.
   - Select the timestamp rebase policy according to Spark's configured output 
timestamp type.
   - Preserve native writes for `CORRECTED`, `TIMESTAMP_NTZ`, and schemas 
without datetime fields.
   - Add regression tests and update the Parquet documentation.
   
   ## How are these changes tested?
   
   The regression tests verify writer selection, Spark read-back with Comet 
disabled, footer metadata, and ancient datetime rejection. Coverage includes 
calendar boundaries, modern values, nulls, empty collections, nested fields, 
and a non-UTC session timezone.
   
   ```
   
   # Spark 4.x
   ./mvnw test -Pspark-4.x -Dtest=none \
     '-Dsuites=org.apache.comet.parquet.CometParquetWriterSuite datetime rebase'
   
   cargo test -p datafusion-comet --lib 
execution::operators::parquet_writer::tests
   
   ```


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to