Skip to content

Commit 51888a1

Browse files
author
jasonnnli
committed
restore example parquet_sql
1 parent 0689d07 commit 51888a1

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

datafusion-examples/examples/parquet_sql.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@ async fn main() -> Result<()> {
3434
ParquetReadOptions::default(),
3535
)
3636
.await?;
37-
let sql = "select now() - interval '1' day from alltypes_plain limit 2";
38-
let sql = "select now()::date + interval '1 hour'";
37+
3938
// execute the query
40-
let df = ctx.sql(sql).await?;
39+
let df = ctx
40+
.sql(
41+
"SELECT int_col, double_col, CAST(date_string_col as VARCHAR) \
42+
FROM alltypes_plain \
43+
WHERE id > 1 AND tinyint_col < double_col",
44+
)
45+
.await?;
4146

4247
// print the results
4348
df.show().await?;

0 commit comments

Comments
 (0)