-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Use case
Using ?fields
with joins doesn't work if the same column name (e.g., id
) occurs in multiple tables, because ?fields
expands to non-qualified names, so the query fails with ambiguous identifier 'id'
client.query("SELECT ?fields FROM table1 JOIN table2 ON table1.foo = table2.bar")
.fetch_all()
.await?;
### Describe the solution you'd like
some kind of API to tell clickhouse how to fully-qualify `?fields`. Maybe something like
client.query("SELECT ?fields ...")
.with_fields_qualified_by("table1")
.fetch_all()
### Describe the alternatives you've considered
For now I'm just writing out the fields by hand by reading `Self::COLUMN_NAMES` in a loop, but because none of the clickhouse escaping functions are public this is kind of unsafe and dumb
### Additional context
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request