john-bodley commented on a change in pull request #7422: Add "validation_only" 
queries to the backend
URL: 
https://github.com/apache/incubator-superset/pull/7422#discussion_r280117308
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -2593,6 +2594,14 @@ def sql_json(self):
         limits = [mydb.db_engine_spec.get_limit_from_sql(rendered_query), 
limit]
         query.limit = min(lim for lim in limits if lim is not None)
 
+        # apply validation transform last -- after template processing
+        if validate_only:
+            spec = mydb.db_engine_spec
+            if spec.supports_validation_queries:
 
 Review comment:
   Shouldn’t this be negated, i.e., if validation is *not* supported a JSON 
error response is returned? Also given this check doesn’t it make raising of 
exceptions somewhat of a moot point?

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