You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/27 15:20:15 UTC

[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #2357: simplify_expressions no longer panics on unsupported evaluations

andygrove commented on code in PR #2357:
URL: https://github.com/apache/arrow-datafusion/pull/2357#discussion_r859932302


##########
datafusion/core/tests/sql/mod.rs:
##########
@@ -535,19 +535,32 @@ async fn plan_and_collect(ctx: &SessionContext, sql: &str) -> Result<Vec<RecordB
 /// Execute query and return results as a Vec of RecordBatches
 async fn execute_to_batches(ctx: &SessionContext, sql: &str) -> Vec<RecordBatch> {
     let msg = format!("Creating logical plan for '{}'", sql);
-    let plan = ctx.create_logical_plan(sql).expect(&msg);
+    let plan = ctx
+        .create_logical_plan(sql)
+        .map_err(|e| format!("{:?} at {}", e, msg))

Review Comment:
   This makes the tests show the actual error that happened so makes debugging much easier



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org