Skip to content

Commit

Permalink
Fix for nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefffrey committed Nov 3, 2023
1 parent 3e41dd3 commit 88ce2a4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly
3 changes: 2 additions & 1 deletion src/arrow_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl NaiveStripeDecoder {
let mut decoders = Vec::with_capacity(stripe.columns.len());
let number_of_rows = stripe
.columns
.get(0)
.first()
.map(|c| c.number_of_rows())
.unwrap_or_default();
for col in &stripe.columns {
Expand All @@ -346,6 +346,7 @@ impl NaiveStripeDecoder {
crate::proto::r#type::Kind::Date => Decoder::Date(new_date_iter(col)?),
crate::proto::r#type::Kind::Varchar => Decoder::String(StringDecoder::new(col)?),
crate::proto::r#type::Kind::Char => Decoder::String(StringDecoder::new(col)?),
crate::proto::r#type::Kind::TimestampInstant => todo!(),
};
decoders.push(decoder);
}
Expand Down
2 changes: 1 addition & 1 deletion src/arrow_reader/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl Column {

pub fn encoding(&self) -> ColumnEncoding {
let column = self.column.column_id();
self.footer.columns[column]
self.footer.columns[column].clone()
}

pub fn number_of_rows(&self) -> usize {
Expand Down
2 changes: 2 additions & 0 deletions src/reader/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub fn create_field((name, typ): (&str, &Arc<TypeDescription>)) -> Field {
Kind::Date => Field::new(name, DataType::Date32, true),
Kind::Varchar => Field::new(name, DataType::Utf8, true),
Kind::Char => Field::new(name, DataType::Utf8, true),
Kind::TimestampInstant => todo!(),
}
}

Expand Down Expand Up @@ -226,5 +227,6 @@ pub fn create_schema(types: &[Type], root_column: usize) -> Result<Arc<TypeDescr
root_column,
))),
Kind::Decimal => Ok(Arc::new(TypeDescription::new(DECIMAL.clone(), root_column))),
Kind::TimestampInstant => todo!(),
}
}

0 comments on commit 88ce2a4

Please sign in to comment.