codeant-ai-for-open-source[bot] commented on code in PR #44281:
URL: https://github.com/apache/superset/pull/44281#discussion_r4012232265


##########
superset/db_engine_specs/mssql.py:
##########
@@ -49,7 +55,7 @@
 )
 
 
-class MssqlEngineSpec(BaseEngineSpec):
+class MssqlEngineSpec(BasicParametersMixin, BaseEngineSpec):

Review Comment:
   **Suggestion:** Azure Synapse inherits this generic builder but uses 
`pyodbc`; the generated URI lacks the required ODBC driver or `odbc_connect` 
details, so surfaced connections cannot establish reliably. [api mismatch]
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Sometimes`
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=b265f6588ec749c0ad9aa8e6b1898869&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=b265f6588ec749c0ad9aa8e6b1898869&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:** superset/db_engine_specs/mssql.py
   **Line:** 58:58
   **Comment:**
        *Api Mismatch: Azure Synapse inherits this generic builder but uses 
`pyodbc`; the generated URI lacks the required ODBC driver or `odbc_connect` 
details, so surfaced connections cannot establish reliably.
   
   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%2F44281&comment_hash=c72e13db3a904928a53c4ebac94ffef6539ff95e958a7fe316d084edf61823fb&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44281&comment_hash=c72e13db3a904928a53c4ebac94ffef6539ff95e958a7fe316d084edf61823fb&reaction=dislike'>๐Ÿ‘Ž</a>



##########
superset/db_engine_specs/mssql.py:
##########
@@ -58,6 +64,18 @@ class MssqlEngineSpec(BaseEngineSpec):
     identifier_quote_start: str = "["
     identifier_quote_end: str = "]"
 
+    # Enables the dynamic connection form: the recommended pymssql driver uses 
a
+    # standard host/port/username/password/database URI, so 
``BasicParametersMixin``
+    # can build it as ``mssql+pymssql://user:pass@host:port/db``.
+    default_driver = "pymssql"
+    parameters_schema = BasicParametersSchema()
+    sqlalchemy_uri_placeholder = (
+        
"mssql+pymssql://user:password@host:port/dbname[?key=value&key=value...]"
+    )
+    # pymssql negotiates TLS at the TDS protocol level rather than through a 
URI
+    # query parameter, so there is no encryption flag to inject into the URL.
+    encryption_parameters: dict[str, str] = {}

Review Comment:
   **Suggestion:** The inherited schema exposes `encryption`, but enabling it 
makes `build_sqlalchemy_uri` raise because this mapping is empty, causing valid 
form submissions to fail. [api mismatch]
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Sometimes`
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=eea2ddc3443448a2ad323c0a94ee6461&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=eea2ddc3443448a2ad323c0a94ee6461&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:** superset/db_engine_specs/mssql.py
   **Line:** 77:77
   **Comment:**
        *Api Mismatch: The inherited schema exposes `encryption`, but enabling 
it makes `build_sqlalchemy_uri` raise because this mapping is empty, causing 
valid form submissions to fail.
   
   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%2F44281&comment_hash=80f5f03d39f12d23bf4064e2977c1846586ec50a9153ae926d20169208b3d9b3&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44281&comment_hash=80f5f03d39f12d23bf4064e2977c1846586ec50a9153ae926d20169208b3d9b3&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]

Reply via email to