Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: execute "select count(*) from tbl" always getting zero
Browse files Browse the repository at this point in the history
harveyyue committed Aug 5, 2024
1 parent 9d36f27 commit c7815cc
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
@@ -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",
6 changes: 4 additions & 2 deletions src/array_decoder/mod.rs
Original file line number Diff line number Diff line change
@@ -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 {

0 comments on commit c7815cc

Please sign in to comment.