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

   ### SUMMARY
   
   Boolean short-circuit in `SliceHeader` makes `countFromSecondQuery` resolve 
to `false` for any non-table viz, and `false != null` is `true`, so 
`Number(false) = 0` overrides the real rowcount fallback — every non-table 
chart loses the row-limit warning. Bug introduced in #37112.
   
   ```diff
   -const isTableChart = formData.viz_type === 'table';
   -const countFromSecondQuery =
   -  isTableChart && secondQueryResponse?.data?.[0]?.rowcount;
   +const isTableChart =
   +  formData.viz_type === VizType.Table ||
   +  formData.viz_type === VizType.TableAgGrid;
   +const countFromSecondQuery = isTableChart
   +  ? secondQueryResponse?.data?.[0]?.rowcount
   +  : undefined;
   ```
   
   Also widens the viz_type check to include `ag-grid-table` so 
server-paginated AG Grid charts read the rowcount sidecar query (same path the 
regular table uses). Same widening applied in `ChartPills` (explore row-count 
label) and `Chart.tsx` (CSV streaming threshold).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A — verified via added unit tests in `SliceHeader.test.tsx`.
   
   ### TESTING INSTRUCTIONS
   1. Create a bar chart with `row_limit=10` against a dataset with >10 rows.
   2. Add to a dashboard — warning icon should appear in the slice header.
   3. Repeat with an AG Grid table with server pagination and a row limit 
smaller than the dataset — warning should appear.
   
   ### ADDITIONAL INFORMATION
   - Has associated issue: No
   - Required feature flags: None
   - Changes UI: Yes — restores row-limit warning icon on non-table charts
   - Includes DB Migration: No
   - Introduces new feature or API: No
   - Removes existing feature or API: No


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