williaster commented on a change in pull request #7888: [sqla] Adding check for 
invalid filter columns
URL: 
https://github.com/apache/incubator-superset/pull/7888#discussion_r304671101
 
 

 ##########
 File path: superset/connectors/sqla/models.py
 ##########
 @@ -721,43 +721,46 @@ def get_sqla_query(  # sqla
             if not all([flt.get(s) for s in ["col", "op"]]):
                 continue
             col = flt["col"]
+
+            if col not in cols:
+                raise Exception(_(f"Column '{col}' is not valid"))
 
 Review comment:
   maybe we could update the language to be a little more precise here? For 
example `Column '{col}' does not exist`  / `... not found`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to