Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(urls): standardize pass-through of parsed query parameters #9482

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Jun 30, 2024

This PR cleans up our URL handling a bit.

  1. We were doing a bunch of unnecessary url parse -> url unparse, only to
    immediately again parse the URL as the first call in every _from_url
    implementation.
  2. Each backend was separately handling converting query parameters to single
    scalars where possible, due to the unparsing
  3. Query parameters were sometimes passed into kwargs and sometimes parsed
    again to then be used as kwargs later

So, I did the following:

  1. Pass the ParseResult into the _from_url implementation.
  2. Convert query parameters into single values where possible before calling backend._from_url
  3. Pass all query parameters as **kwargs into the _from_url call.

Fixes #9456.

@cpcloud cpcloud added this to the 9.2 milestone Jun 30, 2024
@cpcloud cpcloud added bug Incorrect behavior inside of ibis ux User experience related issues labels Jun 30, 2024
@cpcloud cpcloud force-pushed the fix-biqguery-urls branch 4 times, most recently from e87db33 to 4e9220c Compare June 30, 2024 17:26
@cpcloud cpcloud added the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Jun 30, 2024
@ibis-docs-bot ibis-docs-bot bot removed the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Jun 30, 2024
@cpcloud cpcloud requested a review from gforsyth July 1, 2024 13:24
@gforsyth
Copy link
Member

gforsyth commented Jul 1, 2024

Do we want to get #9466 in first?

@cpcloud
Copy link
Member Author

cpcloud commented Jul 1, 2024

Do we want to get #9466 in first?

Yep.

Is that waiting on anything?

@cpcloud cpcloud force-pushed the fix-biqguery-urls branch from 4e9220c to 1f29ecc Compare July 1, 2024 13:58
@cpcloud
Copy link
Member Author

cpcloud commented Jul 1, 2024

Merged #9466 and rebased this PR on main. Hopefully just waiting on CI at this point!

Copy link
Member

@gforsyth gforsyth left a comment

Choose a reason for hiding this comment

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

noice! :shipit:

@gforsyth gforsyth enabled auto-merge (squash) July 1, 2024 14:19
@gforsyth gforsyth merged commit 87cba01 into ibis-project:main Jul 1, 2024
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis ux User experience related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bigquery: ibis.connect doesn't pass through parameters parsed from connection string
2 participants