Pivot: skip inspector query when no group_by hierarchy is active

Without group_by there are no coordinate filters, so the view query
would return the full dataset and hang. Early-return on click if
config.group_by is empty.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-04-15 08:52:09 -04:00
parent 6e9cdd82ea
commit 8d3cc24094

View File

@ -150,6 +150,12 @@ export default function Pivot({ source }) {
if (!row) return
const eventFilters = (detail.config || {}).filter || []
const config = await viewer.save()
// Without a group_by hierarchy there are no coordinate filters, so the
// query would return the entire dataset skip the inspector in that case
const hasHierarchy = (config.group_by || []).length > 0
if (!hasHierarchy) return
setClickDetail({ row, config, column_names, eventFilters })
// Use a Perspective view with the event filters + expressions so computed