bito-code-review[bot] commented on PR #44736:
URL: https://github.com/apache/superset/pull/44736#issuecomment-5864466460
<!-- Bito Reply -->
The review comment is correct. In the test
`test_build_sqlalchemy_uri_uses_the_doris_scheme`, using `make_url` from
`sqlalchemy.engine.url` only parses the URI string into a URL object; it does
not verify if the `drivername` (in this case, `doris`) corresponds to a
registered SQLAlchemy dialect. Consequently, the test passes even if the
`doris` dialect is not properly registered or cannot create an engine.
To resolve this, you should verify that the dialect is actually loadable by
SQLAlchemy. You can update the test to attempt to create an engine or load the
dialect explicitly using `sqlalchemy.engine.create_engine` or
`sqlalchemy.dialects.registry.load`.
Would you like me to implement this fix for the test, and would you like me
to check and address the rest of the comments on this PR?
**tests/unit_tests/db_engine_specs/test_doris.py**
```
uri = DorisEngineSpec.build_sqlalchemy_uri(parameters)
# Verify the dialect is registered and loadable
from sqlalchemy.engine import create_engine
create_engine(uri)
url = make_url(uri)
assert url.drivername == "doris"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]