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

   ### SUMMARY
   
   Chart-data requests for semantic views fail when 
`apply_fetch_values_predicate` is enabled because the model has no 
`fetch_values_predicate` attribute.
   
   Semantic views do not define a dataset-level SQL fetch-values predicate, and 
their datasource metadata already reports it as `null`. Expose that absence on 
the model so the optional flag is a no-op, consistent with the API's “if 
defined in datasource” contract. Explicit query filters still apply.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   No UI change. Before: the request fails with an AttributeError. After: it 
succeeds with its explicit filters preserved, including group-limit mapping.
   
   ### TESTING INSTRUCTIONS
   
   POST `/api/v1/chart/data` using an accessible semantic-view datasource and 
valid dimensions/metrics, with `apply_fetch_values_predicate: true` on the 
query. Confirm the request succeeds and explicit dimension filters are retained.
   
   Regression coverage uses the real API/schema/model/mapper with a mock 
provider, plus a separate mapper case with differing inner bounds. All three 
cases fail without the model property. Existing mapper tests continue checking 
configured SQL predicates.
   
   - `pytest tests/unit_tests/semantic_layers -q`: 1,791 passed.
   - MCP native/tool/chart inventory checks.
   - POT drift and changed-file pre-commit hooks, including MyPy.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [x] Required feature flags: `SEMANTIC_LAYERS`
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] 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