Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmedal committed Aug 2, 2024
1 parent 1d525f9 commit 57d9801
Show file tree
Hide file tree
Showing 5 changed files with 346 additions and 395 deletions.
5 changes: 1 addition & 4 deletions datafusion/sql/tests/cases/plan_to_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,7 @@ fn test_unnest_logical_plan() -> Result<()> {
let sql_to_rel = SqlToRel::new(&context);
let plan = sql_to_rel.sql_statement_to_plan(statement).unwrap();

let expected = "Projection: unnest(unnest_table.struct_col).field1, unnest(unnest_table.struct_col).field2, unnest(unnest_table.array_col), unnest_table.struct_col, unnest_table.array_col\
\n Unnest: lists[unnest(unnest_table.array_col)] structs[unnest(unnest_table.struct_col)]\
\n Projection: unnest_table.struct_col AS unnest(unnest_table.struct_col), unnest_table.array_col AS unnest(unnest_table.array_col), unnest_table.struct_col, unnest_table.array_col\
\n TableScan: unnest_table";
let expected = "Projection: \"unnest(unnest_table.struct_col).field1\", \"unnest(unnest_table.struct_col).field2\", \"unnest(unnest_table.array_col)\", unnest_table.struct_col, unnest_table.array_col\n Unnest: lists[\"unnest(unnest_table.array_col)\"] structs[\"unnest(unnest_table.struct_col)\"]\n Projection: unnest_table.struct_col AS unnest(unnest_table.struct_col), unnest_table.array_col AS unnest(unnest_table.array_col), unnest_table.struct_col, unnest_table.array_col\n TableScan: unnest_table";

assert_eq!(format!("{plan:?}"), expected);

Expand Down
Loading

0 comments on commit 57d9801

Please sign in to comment.