Skip to content

fix: correctly handle empty scheme in trino backend connect#11908

Closed
veeceey wants to merge 1 commit intoibis-project:mainfrom
veeceey:fix/issue-11841-trino-empty-scheme
Closed

fix: correctly handle empty scheme in trino backend connect#11908
veeceey wants to merge 1 commit intoibis-project:mainfrom
veeceey:fix/issue-11841-trino-empty-scheme

Conversation

@veeceey
Copy link
Copy Markdown

@veeceey veeceey commented Feb 8, 2026

Summary

Fixes #11841

The walrus operator in the auth string check was evaluating to False when urlparse(host).scheme returned an empty string, preventing BasicAuthentication from being set up correctly when using http_scheme parameter with hosts that don't have a scheme prefix.

Changes

  • Changed condition from and (scheme := urlparse(host).scheme) to and (scheme := urlparse(host).scheme) is not None
  • This correctly handles empty string schemes (when host is provided without protocol prefix like "example.com")

Test Plan

  • Manually verified the logic handles empty string scheme correctly
  • Verified existing trino tests still pass
  • Confirmed the fix allows BasicAuthentication to be set up when host doesn't have scheme prefix

The walrus operator in the auth string check was evaluating to False
when urlparse(host).scheme returned an empty string, preventing
BasicAuthentication from being set up correctly. Changed to explicitly
check 'is not None' to handle hosts without scheme prefixes.

Fixes ibis-project#11841
@github-actions github-actions bot added the trino The Trino backend label Feb 8, 2026
@gforsyth
Copy link
Copy Markdown
Member

gforsyth commented Feb 9, 2026

This looks like an LLM-generated PR that's a duplicate of #11842 anyway.

@gforsyth gforsyth closed this Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trino The Trino backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: trino backend connect incorrectly processes empty scheme

2 participants