Skip to content

Expr::Wildcard should use TableReference as the qualifier type #11072

@linhr

Description

@linhr

Is your feature request related to a problem or challenge?

Currently, the wildcard expression is defined as Wildcard { qualifier: Option<String> }, and the semantic of the qualifier is unclear. During logical planning, the qualifier string is implicitly parsed via TableReference::from(), which invokes the SQL parser with the generic dialect.

Describe the solution you'd like

It might be a good idea to directly use TableReference as the type for wildcard qualifiers. Doing so will have the following benefits.

  1. It will make the semantic more clear from the type.
  2. It will avoid potential bugs when the qualifier is quoted/escaped in a way not supported by the generic SQL dialect.
  3. It will make Expr::Wildcard more consistent with other variants such as Expr::Alias(Alias) (which has relation: Option<TableReference> as a field).

Describe alternatives you've considered

N/A

Additional context

N/A

Metadata

Metadata

Assignees

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