This is an automated email from the ASF dual-hosted git repository.
jakevin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new 00e60f167 minor: replace `unwrap()` with `?` (#5262)
00e60f167 is described below
commit 00e60f1678c0896c5007f08c7516e3e2a9aa8e2b
Author: jakevin <[email protected]>
AuthorDate: Mon Feb 13 15:29:30 2023 +0800
minor: replace `unwrap()` with `?` (#5262)
---
datafusion/core/tests/dataframe.rs | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/datafusion/core/tests/dataframe.rs
b/datafusion/core/tests/dataframe.rs
index f7274fdab..2259fc3ac 100644
--- a/datafusion/core/tests/dataframe.rs
+++ b/datafusion/core/tests/dataframe.rs
@@ -205,24 +205,19 @@ async fn select_with_alias_overwrite() -> Result<()> {
let batch = RecordBatch::try_new(
Arc::new(schema.clone()),
vec![Arc::new(Int32Array::from_slice([1, 10, 10, 100]))],
- )
- .unwrap();
+ )?;
let ctx = SessionContext::new();
ctx.register_batch("t", batch).unwrap();
let df = ctx
.table("t")
- .await
- .unwrap()
- .select(vec![col("a").alias("a")])
- .unwrap()
- .select(vec![(col("a").eq(lit(10))).alias("a")])
- .unwrap()
- .select(vec![col("a")])
- .unwrap();
+ .await?
+ .select(vec![col("a").alias("a")])?
+ .select(vec![(col("a").eq(lit(10))).alias("a")])?
+ .select(vec![col("a")])?;
- let results = df.collect().await.unwrap();
+ let results = df.collect().await?;
#[rustfmt::skip]
let expected = vec![