alamb commented on a change in pull request #1376:
URL: https://github.com/apache/arrow-datafusion/pull/1376#discussion_r763478322



##########
File path: datafusion/src/optimizer/simplify_expressions.rs
##########
@@ -1632,18 +1525,22 @@ mod tests {
         \n      TableScan: test projection=None";
 
         assert_optimized_plan_eq(&plan, expected);
-        Ok(())
     }
 
     #[test]
-    fn test_simplity_optimized_plan_not_eq_expr() -> Result<()> {
-        let table_scan = test_table_scan()?;
+    fn test_simplity_optimized_plan_not_eq_expr() {
+        let table_scan = test_table_scan();
         let plan = LogicalPlanBuilder::from(table_scan)
-            .filter(col("b").not_eq(lit(true)))?
-            .filter(col("c").not_eq(lit(false)))?
-            .limit(1)?
-            .project(vec![col("a")])?
-            .build()?;
+            .filter(col("b").not_eq(lit(true)))
+            .unwrap()

Review comment:
       It helps me more easily find the source of the problem -- by using 
`unwap()` whenever an error happens, you can set `RUST_BACKTRACE=1` and know 
exactly at what site the problem happened. If the tests return `Error`, often 
the `Error` does not have sufficient context to know exactly where it was 
generated.  




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to