fn sql_select_to_rex(
        &self,
        sql: &sqlparser::ast::SelectItem,
        schema: &DataSchema,
    ) -> Result<ExpressionPlan> {
        match sql {
            sqlparser::ast::SelectItem::UnnamedExpr(expr) => self.sql_to_rex(expr, schema),
            sqlparser::ast::SelectItem::ExprWithAlias { expr, alias } => Ok(ExpressionPlan::Alias(
                alias.value.clone(),
                Box::new(self.sql_to_rex(&expr, schema)?),
            )),
            sqlparser::ast::SelectItem::Wildcard => Ok(ExpressionPlan::Wildcard),
            _ => bail!("SelectItem: {:?} are not supported", sql),
        }
    }
/// Generate a relational expression from a select SQL expression
Generate a relational expression from a select SQL expression
Generate a relational expression from a select SQL expression
fn sql_select_to_rex(
        &self,
        sql: &sqlparser::ast::SelectItem,
        schema: &DataSchema,
    ) -> Result<ExpressionPlan> {
        match sql {
            sqlparser::ast::SelectItem::UnnamedExpr(expr) => self.sql_to_rex(expr, schema),
            sqlparser::ast::SelectItem::ExprWithAlias { expr, alias } => Ok(ExpressionPlan::Alias(
                alias.value.clone(),
                Box::new(self.sql_to_rex(&expr, schema)?),
            )),
            sqlparser::ast::SelectItem::Wildcard => Ok(ExpressionPlan::Wildcard),
            _ => bail!("SelectItem: {:?} are not supported", sql),
        }
    }
fn sql_select_to_rex ( & self , sql : & sqlparser :: ast :: SelectItem , schema : & DataSchema , ) -> Result < ExpressionPlan > { match sql { sqlparser :: ast :: SelectItem :: UnnamedExpr ( expr ) => self . sql_to_rex ( expr , schema ) , sqlparser :: ast :: SelectItem :: ExprWithAlias { expr , alias } => Ok ( ExpressionPlan :: Alias ( alias . value . clone ( ) , Box :: new ( self . sql_to_rex ( & expr , schema ) ? ) , ) ) , sqlparser :: ast :: SelectItem :: Wildcard => Ok ( ExpressionPlan :: Wildcard ) , _ => bail ! ( " " sql ) , } }
Generate a relational expression from a select SQL expression
Generate a relational expression from a select SQL expression
&self
sql
&sqlparser::ast::SelectItem
schema
&DataSchema
&self
sql
&sqlparser::ast::SelectItem
schema
&DataSchema