pub fn query_to_plan(&self, query: &sqlparser::ast::Query) -> Result<PlanNode> {
        if query.with.is_some() {
            return Result::Err(ErrorCode::UnImplement("CTE is not yet implement"));
        }

        match &query.body {
            sqlparser::ast::SetExpr::Select(s) => {
                self.select_to_plan(s.as_ref(), &query.limit, &query.offset, &query.order_by)
            }
            _ => Result::Err(ErrorCode::UnImplement(format!(
                "Query {} is not yet implemented",
                query.body
            ))),
        }
    }
/// Generate a logic plan from an SQL query
Generate a logic plan from an SQL query
Generate a logic plan from an SQL query
pub fn query_to_plan(&self, query: &sqlparser::ast::Query) -> Result<PlanNode> {
        if query.with.is_some() {
            return Result::Err(ErrorCode::UnImplement("CTE is not yet implement"));
        }
        match &query.body {
            sqlparser::ast::SetExpr::Select(s) => {
                self.select_to_plan(s.as_ref(), &query.limit, &query.offset, &query.order_by)
            }
            _ => Result::Err(ErrorCode::UnImplement(format!(
                "Query {} is not yet implemented",
                query.body
            ))),
        }
    }
pub fn query_to_plan ( & self , query : & sqlparser :: ast :: Query ) -> Result < PlanNode > { if query . with . is_some ( ) { return Result :: Err ( ErrorCode :: UnImplement ( " " ) ) ; } match & query . body { sqlparser :: ast :: SetExpr :: Select ( s ) => { self . select_to_plan ( s . as_ref ( ) , & query . limit , & query . offset , & query . order_by ) } _ => Result :: Err ( ErrorCode :: UnImplement ( format ! ( " " query body ) ) ) , } }
Generate a logic plan from an SQL query
Generate a logic plan from an SQL query
&self
query
&sqlparser::ast::Query
&self
query
&sqlparser::ast::Query