sha174n opened a new pull request, #41427:
URL: https://github.com/apache/superset/pull/41427

   ### SUMMARY
   
   `SqlaTable.validate_expression` (POST 
`/api/v1/datasource/<type>/<id>/validate_expression/`) builds its validation 
query directly from the submitted expression. This routes the expression 
through `validate_stored_expression` first, so expression validation applies 
the same parsing policy already enforced for stored adhoc column and metric 
expressions: a single statement, no set operations, and no sub-queries unless 
`ALLOW_ADHOC_SUBQUERY` is enabled. The result is one consistent parsing policy 
across the query pipeline.
   
   ### TESTING INSTRUCTIONS
   
   `pytest tests/unit_tests/models/test_validate_expression.py` — adds coverage 
that the validator reports a sub-query or set-operation expression as invalid 
before the validation query is built or run, alongside the existing 
valid-expression paths.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue
   - [ ] Required feature flags
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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