Skip to content

Commit

Permalink
implement StringArrayConverter and replace ComplexObjectArrayReader w…
Browse files Browse the repository at this point in the history
…ith ArrowArrayReader for reading StringArrays
  • Loading branch information
yordan-pavlov committed May 1, 2021
1 parent dc93466 commit 95ed8a0
Show file tree
Hide file tree
Showing 3 changed files with 270 additions and 52 deletions.
23 changes: 14 additions & 9 deletions rust/parquet/src/arrow/array_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1477,16 +1477,21 @@ impl<'a> ArrayReaderBuilder {
arrow_type,
)?))
} else {
let converter = Utf8Converter::new(Utf8ArrayConverter {});
Ok(Box::new(ComplexObjectArrayReader::<
ByteArrayType,
Utf8Converter,
>::new(
page_iterator,
column_desc,
converter,
arrow_type,
use crate::arrow::arrow_array_reader::{StringArrayConverter, ArrowArrayReader};
let converter = StringArrayConverter::new();
Ok(Box::new(ArrowArrayReader::try_new(
*page_iterator, column_desc, converter, None
)?))
// let converter = Utf8Converter::new(Utf8ArrayConverter {});
// Ok(Box::new(ComplexObjectArrayReader::<
// ByteArrayType,
// Utf8Converter,
// >::new(
// page_iterator,
// column_desc,
// converter,
// arrow_type,
// )?))
}
} else if let Some(ArrowType::LargeBinary) = arrow_type {
let converter =
Expand Down
Loading

0 comments on commit 95ed8a0

Please sign in to comment.