Skip to content

Commit

Permalink
Removes unnecessary namespce alias
Browse files Browse the repository at this point in the history
  • Loading branch information
dantengsky committed Jun 5, 2021
1 parent 92dad88 commit 0dc60e2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fusequery/query/src/sql/plan_parser.rs
Expand Up @@ -563,10 +563,8 @@ impl PlanParser {
}

fn create_relation(&self, relation: &sqlparser::ast::TableFactor) -> Result<PlanNode> {
use sqlparser::ast::TableFactor as Ast;

match relation {
Ast::Table { name, args, .. } => {
TableFactor::Table { name, args, .. } => {
let mut db_name = self.ctx.get_current_database();
let mut table_name = name.to_string();
if name.0.len() == 2 {
Expand Down Expand Up @@ -626,9 +624,11 @@ impl PlanParser {
_unreachable_plan => panic!("Logical error: Cannot downcast to scan plan"),
})
}
Ast::Derived { subquery, .. } => self.query_to_plan(subquery),
Ast::NestedJoin(table_with_joins) => self.plan_table_with_joins(table_with_joins),
Ast::TableFunction { .. } => {
TableFactor::Derived { subquery, .. } => self.query_to_plan(subquery),
TableFactor::NestedJoin(table_with_joins) => {
self.plan_table_with_joins(table_with_joins)
}
TableFactor::TableFunction { .. } => {
Result::Err(ErrorCodes::UnImplement("Unsupported table function"))
}
}
Expand Down

0 comments on commit 0dc60e2

Please sign in to comment.