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/29 00:01:03 UTC

[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #2373: Fix bugs with CTE aliasing

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


##########
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))
+        .unwrap();

Review Comment:
   These changes are to make the tests show error messages to make debugging 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