Skip to content

Conversation

douenergy
Copy link

Which issue does this PR close?

Canner/wren-engine#1089

Rationale for this change

Add an additional unparser rule for every dialect to allow dialects to override column aliases.

What changes are included in this PR?

Rewrite BigQuery column aliases.

Are these changes tested?

In datafusion/sql/tests/cases/plan_to_sql.rs roundtrip_statement_with_dialect.

@douenergy douenergy requested a review from goldmedal March 24, 2025 01:53
@github-actions github-actions bot added the sql label Mar 24, 2025
@douenergy
Copy link
Author

image

@douenergy douenergy changed the base branch from v46 to v46.0.1 March 24, 2025 02:41
@douenergy douenergy force-pushed the bigquery-col-alias branch from ec9739f to 8dedb1b Compare March 24, 2025 02:43
@douenergy douenergy requested a review from goldmedal March 24, 2025 10:02
@douenergy
Copy link
Author

@goldmedal Thank you for the review. I have addressed your comments. I agree that encoding the column name is a better idea.

Also, I will add a test case that includes a special character column name in the where clause.

Copy link

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @douenergy. looks good to me 👍
I leave some minor suggestions.

@goldmedal goldmedal merged commit 80009c4 into v46.0.1 Mar 25, 2025
50 checks passed
@goldmedal goldmedal deleted the bigquery-col-alias branch March 25, 2025 08:11
@goldmedal
Copy link

Thanks @douenergy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants