alamb commented on a change in pull request #870:
URL: https://github.com/apache/arrow-rs/pull/870#discussion_r739217009
##########
File path: arrow/src/ipc/writer.rs
##########
@@ -137,20 +137,45 @@ impl IpcDataGenerator {
}
}
- pub fn encoded_batch(
+ fn encode_dictionaries(
&self,
- batch: &RecordBatch,
+ field: &Field,
+ column: &ArrayRef,
+ encoded_dictionaries: &mut Vec<EncodedData>,
dictionary_tracker: &mut DictionaryTracker,
write_options: &IpcWriteOptions,
- ) -> Result<(Vec<EncodedData>, EncodedData)> {
- // TODO: handle nested dictionaries
- let schema = batch.schema();
- let mut encoded_dictionaries =
Vec::with_capacity(schema.fields().len());
-
- for (i, field) in schema.fields().iter().enumerate() {
- let column = batch.column(i);
-
- if let DataType::Dictionary(_key_type, _value_type) =
column.data_type() {
+ ) -> Result<()> {
+ // TODO: Handle other nested types (map, list, etc)
Review comment:
might be worth filing another tracking ticket if you have time
--
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]