alamb commented on code in PR #5875:
URL: https://github.com/apache/arrow-rs/pull/5875#discussion_r1641314456
##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -107,6 +107,20 @@ mod levels;
/// }
/// ```
///
+/// ## Type Support
+///
+/// The writer supports writing all Arrow [`DataType`]s that have a direct
mapping to
+/// Parquet types including [`StructArray`] and [`ListArray`].
+///
+/// The following are not supported:
+///
+/// * [`IntervalMonthDayNanoArray`]: Parquet does not [support nanosecond
intervals].
+///
Review Comment:
I double checked and it seems like Date64 can be written:
```sql
andrewlamb@Andrews-MacBook-Pro-2:~/Software/arrow-rs$ datafusion-cli -c
'select c1, arrow_typeof(c1) from "/tmp/test.parquet"'
DataFusion CLI v39.0.0
+---------------------+------------------------------------+
| c1 | arrow_typeof(/tmp/test.parquet.c1) |
+---------------------+------------------------------------+
| 1970-01-01T00:00:00 | Date64 |
| 1970-01-01T00:00:00 | Date64 |
+---------------------+------------------------------------+
2 row(s) fetched.
Elapsed 0.005 seconds.
```
```rust
fn main() {
let input_array = Date64Array::from(vec![123, 456]);
let batch = RecordBatch::try_from_iter(
vec![("c1", Arc::new(input_array) as _)]
).unwrap();
println!("Input array: {}",
pretty_format_batches(&[batch.clone()]).unwrap());
if let Err(e) = std::fs::remove_file("/tmp/test.parquet") {
println!("can't remove file: {e:?}");
}
// round trip to parquet
let f = File::create_new("/tmp/test.parquet").unwrap();
let schema = batch.schema();
let props = None;
let mut writer = ArrowWriter::try_new(f, schema, props).unwrap();
writer.write(&batch).unwrap();
writer.flush().unwrap();
writer.close();
}
```
--
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]