sunchao / parquet-rs

Apache Parquet implementation in Rust
Apache License 2.0
149 stars 20 forks source link

Ergonomics: add .as_*() to ColumnWriter #213

Open aldanor opened 3 years ago

aldanor commented 3 years ago

It might be nice to avoid tons of if let and match statements all over the place to add .as_*() methods to ColumnWriter, for example:

col_writer.as_double()?.write_batch(&data, None, None)?;
aldanor commented 3 years ago

(This already exists as a separate function get_typed_column_writer_mut() or something like that - it's just it would be nice to have it as method; also that function panics instead of returning Result)