codeant-ai-for-open-source[bot] commented on code in PR #45205:
URL: https://github.com/apache/superset/pull/45205#discussion_r4243505754
##########
tests/unit_tests/db_engine_specs/test_mssql.py:
##########
@@ -879,3 +879,22 @@ def
test_get_catalog_from_engine_params_empty_database_query_param_falls_back_to
)
assert "database" not in url.query
assert MssqlEngineSpec.get_catalog_from_engine_params(url, {}) == "path_db"
+
+
+def test_azure_synapse_properties() -> None:
+ from superset.db_engine_specs.mssql import AzureSynapseSpec,
MssqlEngineSpec
+
+ assert AzureSynapseSpec.engine == "mssql"
+ assert AzureSynapseSpec.engine_name == "Azure Synapse"
+ assert AzureSynapseSpec.default_driver == "pyodbc"
+ assert issubclass(AzureSynapseSpec, MssqlEngineSpec)
+
+
+def test_azure_synapse_metadata() -> None:
+ from superset.db_engine_specs.mssql import AzureSynapseSpec
+
+ metadata = AzureSynapseSpec.metadata
+ assert "Azure Synapse Analytics" in metadata["description"]
+ assert metadata["logo"] == "azure.svg"
+ assert "pymssql" in metadata["pypi_packages"]
Review Comment:
**Suggestion:** This checks for `pymssql`, although Azure Synapse's default
connection URI uses `pyodbc`; it passes while the advertised packages omit the
required default driver.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Sometimes` ยท ๐ท๏ธ `Api mismatch`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=a93cb770655e4f108a75ff14c66c7c6e&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=a93cb770655e4f108a75ff14c66c7c6e&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** tests/unit_tests/db_engine_specs/test_mssql.py
**Line:** 899:899
**Comment:**
*Api Mismatch: This checks for `pymssql`, although Azure Synapse's
default connection URI uses `pyodbc`; it passes while the advertised packages
omit the required default driver.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45205&comment_hash=7b1ce87befe4d86d852b700cc64757976044dc49ca0afb596b4fc401e6404551&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45205&comment_hash=7b1ce87befe4d86d852b700cc64757976044dc49ca0afb596b4fc401e6404551&reaction=dislike'>๐</a>
--
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]