ranflarion opened a new pull request, #12263: URL: https://github.com/apache/arrow-rs/pull/12263
# Which issue does this PR close? - Closes #12262. # Rationale for this change `ArrowWriter` panics when the supplied Parquet schema declares an INT96 column, so Arrow timestamps cannot be written as INT96, Spark's default timestamp type. # What changes are included in this PR? - `write_leaf` writes `Timestamp` arrays of any unit to INT96 columns as the Julian day and the nanoseconds of the day, converting only non-null values. Other Arrow types get a "Cannot coerce" error, as for the other physical types, and a value whose Julian day does not fit in `i32` gets an error. - A crate-private `Int96::from_epoch_nanos` for the conversion, compiled with the `arrow` feature. # Are these changes tested? Yes: a round trip through INT96 of second, microsecond (with a time zone) and nanosecond columns and a list of millisecond timestamps, with nulls and values before the epoch; an out-of-range error; unit tests of the conversion. # Are there any significant user-facing changes? No public API changes. Writers that do not declare INT96 in their Parquet schema are unaffected. # AI usage disclosure AI tools were used to write the code, tests and this description. I own this change. -- 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]
