Skip to content

Commit

Permalink
feat: analyze/optimize plan in CREATE TABLE AS SELECT (apache#6610)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener authored and jayzhan211 committed Jun 12, 2023
1 parent a47a3b4 commit 065a493
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions datafusion/core/src/execution/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ impl SessionContext {
}

let input = Arc::try_unwrap(input).unwrap_or_else(|e| e.as_ref().clone());
let input = self.state().optimize(&input)?;
let table = self.table(&name).await;

match (if_not_exists, or_replace, table) {
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/tests/sqllogictests/test_files/groupby.slt
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ GRC [80.0, 30.0] 110
TUR [100.0, 75.0] 175

# test_ordering_sensitive_aggregation7
# Lexicographical ordering requirement can be given as
# Lexicographical ordering requirement can be given as
# argument to the aggregate functions
query TT
EXPLAIN SELECT s.country, ARRAY_AGG(s.amount ORDER BY s.country DESC, s.amount DESC) AS amounts,
Expand Down

0 comments on commit 065a493

Please sign in to comment.