betodealmeida commented on a change in pull request #16214:
URL: https://github.com/apache/superset/pull/16214#discussion_r687891875



##########
File path: superset/db_engine_specs/base.py
##########
@@ -1410,7 +1410,8 @@ def build_sqlalchemy_uri(
         parameters: BasicParametersType,
         encryted_extra: Optional[Dict[str, str]] = None,
     ) -> str:
-        query = parameters.get("query", {})
+        # make a copy so that we don't update the original
+        query = dict(parameters.get("query", {}))

Review comment:
       Nit to be more explicit:
   
   ```suggestion
           query = parameters.get("query", {}).copy()
   ```

##########
File path: superset/db_engine_specs/base.py
##########
@@ -1433,6 +1434,11 @@ def get_parameters_from_uri(
         cls, uri: str, encrypted_extra: Optional[Dict[str, Any]] = None
     ) -> BasicParametersType:
         url = make_url(uri)
+        query = {
+            key: value
+            for (key, value) in url.query.items()
+            if (key, value) not in cls.encryption_parameters.items()

Review comment:
       Do you need to test that both key and value match? Is there a case where 
key will match but not the value?




-- 
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