-
Notifications
You must be signed in to change notification settings - Fork 590
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(oracle, clickhouse): ensure port is captured in _from_url implementation
#9507
fix(oracle, clickhouse): ensure port is captured in _from_url implementation
#9507
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this in @grieve54706 !
One small request around checking that the port parsing is working as expected (and to contrast it to the behavior when the port is incorrect)
|
|
||
|
|
||
| def test_invalid_port(con): | ||
| port = 9999 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a successful connection using the correct port at the beginning of this test to show that the port is being correctly parsed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea. I will add a successful test case. Thanks.
port is captured in Oracle and ClickHouse _from_url implementationport is captured in _from_url implementation
| port = 9999 | ||
| url = f"oracle://{ORACLE_USER}:{ORACLE_PASS}@{ORACLE_HOST}:{port}/IBIS_TESTING" | ||
| with pytest.raises( | ||
| oracledb.OperationalError, | ||
| match="DPY-6005: cannot connect to database", | ||
| ): | ||
| ibis.connect(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, same request here, too, re: adding a successful connection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the test_from_url is enough proof. WDYT?
def test_from_url(con):
new_con = ibis.connect("oracle://ibis:ibis@localhost:1521/IBIS_TESTING")
assert new_con.list_tables()cab3414
to
9b6d8d6
Compare
9b6d8d6
to
405d752
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks for putting this together @grieve54706 !
|
Thanks @gforsyth. Thank you for your time. |
Description of changes
Fix oracle and clickhouse missing
portin_from_url.