Skip to content

Move SQL query planning to new crate #2345

@andygrove

Description

@andygrove

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
This is a long-term goal and not possible to do today but I think it would be good to improve the separation between planning and execution over time.

Users who just want to use DataFusion for query planning would be able to add a dependency on datafusion-sql.

Describe the solution you'd like
I would like the ability to have projects just depend on datafusion-sql if they are using DataFusion as a SQL parser + query planner and are not using it for execution.

Possible steps towards doing this:

  • Move ExpressionVisitor and exprlist_to_columns from optimizer module to datafusion-expr crate
  • Move expand_wildcard and expand_qualified_wildcard from builder to expr
  • Move/copy TableReference from catalog to `sql or a common crate
  • SQL planner needs to stop using LogicalPlanBuilder (which depends on datasource and physical plan and also is not CTE-aware) - or we need to move LogicalPlanBuilder to expr, but it depends on datasource + physical plan

Describe alternatives you've considered
None

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions