Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: Returning error instead of using unreachable
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Dec 23, 2024
commit 5510b48033ea20c20e68deba50006f9cec481053
6 changes: 5 additions & 1 deletion parquet/src/arrow/async_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,11 @@ where
pub async fn next_row_group(&mut self) -> Result<Option<ParquetRecordBatchReader>> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if next_row_group is the best name, open to other options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good, clear name as it clearly explains what it does

loop {
match &mut self.state {
StreamState::Decoding(_) | StreamState::Reading(_) => unreachable!(),
StreamState::Decoding(_) | StreamState::Reading(_) => {
return Err(ParquetError::General(
"Cannot combine the use of next_row_group with the Stream API".to_string(),
))
}
StreamState::Init => {
let row_group_idx = match self.row_groups.pop_front() {
Some(idx) => idx,
Expand Down
Loading