Skip to content

Commit

Permalink
fix: execute "select count(*) from tbl" always getting zero
Browse files Browse the repository at this point in the history
  • Loading branch information
harveyyue committed Aug 5, 2024
1 parent 9d36f27 commit c7815cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions examples/datafusion_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ async fn main() -> Result<()> {
.show()
.await?;

ctx.sql("select count(*) from table1")
.await?
.show()
.await?;
ctx.sql("select count(*) from table1").await?.show().await?;

ctx.read_orc(
"tests/basic/data/alltypes.snappy.orc",
Expand Down
6 changes: 4 additions & 2 deletions src/array_decoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,10 @@ impl NaiveStripeDecoder {
RecordBatch::try_new_with_options(
Arc::clone(&self.schema_ref),
fields,
&RecordBatchOptions::new().with_row_count(Some(self.batch_size.min(remaining)))
).context(error::ConvertRecordBatchSnafu)?,
&RecordBatchOptions::new()
.with_row_count(Some(self.batch_size.min(remaining))),
)
.context(error::ConvertRecordBatchSnafu)?,
))
}
} else {
Expand Down

0 comments on commit c7815cc

Please sign in to comment.