aminghadersohi commented on PR #45571:
URL: https://github.com/apache/superset/pull/45571#issuecomment-6331594614

   Acceptance of the drill range change, at 
9d8c2acb81462f8a922a5853404e640600d63112 (local docker-compose-light env, 
examples data).
   
   **Drill to detail and Drill by on a grained temporal ring** both send the 
bucket as a `TEMPORAL_RANGE` and return exactly the bucket's rows. I compared 
every run against a direct SQL count of the bucket:
   
   | Dataset | Grain | Bucket | Drill to detail | Drill by (sum) | SQL |
   |---|---|---|---|---|---|
   | no offset | Day | 2005-03-01 | 18 | 18 | 18 |
   | no offset | Week | 2004-11-29 | 63 | 63 | 63 |
   | no offset | Month | 2004-10 | 159 | 159 | 159 |
   | no offset | Year | 2004 | 1345 | 1345 | 1345 |
   | Hours offset 5 | Day | 2004-07-24 | 18 | 18 | 18 |
   | Hours offset 5 | Week | 2004-07-19 | 66 | 66 | 66 |
   | Hours offset 5 | Month | 2004-10 | 170 | 170 | 170 |
   | Hours offset 5 | Year | 2004 | 1345 | 1345 | 1345 |
   | Hours offset 5, dashboard Time grain = Year over a saved Month | Year | 
2004 | 1345 | 1345 | 1345 |
   
   The offset dataset puts each row near a day boundary, so the offset moves 
rows between months (October 2004: 159 rows without the offset, 170 with it); 
the ring value and both drills agree on 170.
   
   I added `tests/unit_tests/models/test_sunburst_drill_hours_offset.py`: it 
runs the Sunburst ring query and both drill queries on real rows with a 5 hour 
offset and checks each bucket's drill count equals the ring count. Removing the 
offset shift on range filters in `superset/models/helpers.py` makes 3 of its 4 
tests fail.
   
   Also re-checked: a Sunburst saved without a grain sends the same drill 
filters as before this change; embedded guests load the grained charts (8/8), 
and a forged grained column outside the hierarchy is still rejected (403).
   
   Not related to this change and unchanged from master: Drill by on a temporal 
ring **without** a grain still sends the formatted label (for example 
`order_date == 'March'`) and the query fails. Same root as the existing 
cross-filter behaviour; I'm tracking it separately.
   
   Screenshots in the description are updated to this head.
   


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