-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Id642fcfdf4cd2e8a8bc7a1f01d596082bad0ca59
- Loading branch information
1 parent
42abf91
commit 37f91c7
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
extern crate duckdb; | ||
use duckdb::{Connection, Result}; | ||
|
||
use arrow::record_batch::RecordBatch; | ||
use arrow::util::pretty::print_batches; | ||
|
||
fn main() -> Result<()> { | ||
let db = Connection::open_in_memory()?; | ||
db.execute_batch("INSTALL parquet; LOAD parquet;")?; | ||
let rbs: Vec<RecordBatch> = db | ||
.prepare("SELECT * FROM read_parquet('./examples/int32_decimal.parquet');")? | ||
.query_arrow([])? | ||
.collect(); | ||
assert!(print_batches(&rbs).is_ok()); | ||
Ok(()) | ||
} |