From 27f436e6f13dbca7a6551e57528a6b545aa2dfe8 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 22 Sep 2026 06:20:14 +0000 Subject: [PATCH 1/3] fix(app): apply the clicked series' WHERE to a chart's Search action A builder chart keeps each series' filter in its own aggCondition, not in the statement-level where, so a drill-down built from chart-level state alone spans every series and its counts don't reconcile with the clicked line. Resolve the clicked series from the result column it was plotted from (value columns map positionally onto select) and AND its aggCondition onto the search. A whole-bucket click, a merged ratio column, or a formula column falls back to the union of every series' condition, which is the scan scope the chart used. Co-authored-by: Mike Shi --- .changeset/chart-search-series-where.md | 12 ++ packages/app/src/ChartUtils.tsx | 17 +++ .../app/src/__tests__/eventsSearchUrl.test.ts | 84 +++++++++++ packages/app/src/components/DBTimeChart.tsx | 82 ++++++++++- .../components/__tests__/DBTimeChart.test.tsx | 131 ++++++++++++++++++ .../components/charts/ChartSeriesTooltip.tsx | 25 +++- .../__tests__/ChartSeriesTooltip.test.tsx | 48 ++++++- 7 files changed, 388 insertions(+), 11 deletions(-) create mode 100644 .changeset/chart-search-series-where.md diff --git a/.changeset/chart-search-series-where.md b/.changeset/chart-search-series-where.md new file mode 100644 index 0000000000..aeddaeb461 --- /dev/null +++ b/.changeset/chart-search-series-where.md @@ -0,0 +1,12 @@ +--- +'@hyperdx/app': patch +--- + +fix: carry the clicked series' WHERE condition into a chart's Search action + +A builder chart keeps each series' filter in its own `aggCondition`, not in the +statement-level `where`, so a drill-down built from chart-level state alone +spanned every series and its counts didn't reconcile with the clicked line. The +per-series Search now ANDs that series' condition onto the search, and "View all +events" carries the union of every series' condition (the scan scope the chart +itself used). diff --git a/packages/app/src/ChartUtils.tsx b/packages/app/src/ChartUtils.tsx index 35a99e86b5..e5479e936f 100644 --- a/packages/app/src/ChartUtils.tsx +++ b/packages/app/src/ChartUtils.tsx @@ -1189,12 +1189,20 @@ export function buildEventsSearchUrl({ dateRange, groupFilters, valueRangeFilter, + seriesCondition, }: { source: TSource; config: BuilderChartConfigWithDateRange; dateRange: [Date, Date]; groupFilters?: Array<{ column: string; value: any }>; valueRangeFilter?: { expression: string; value: number; threshold?: number }; + /** + * The WHERE the clicked series aggregated over, already variable-expanded by + * the caller (see `resolveSeriesConditionFilter`). A builder chart keeps each + * series' filter in its `aggCondition`, so without this the search spans + * every series on the chart. + */ + seriesCondition?: Filter; }): string | null { if (!source?.id) { return null; @@ -1224,6 +1232,10 @@ export function buildEventsSearchUrl({ let where = config.where; let whereLanguage = config.whereLanguage || 'lucene'; + // A lone series' condition reads better in the search bar than as a filter + // pill, and with an empty chart-level `where` there is nothing to AND it + // with. Every other shape keeps it as a filter below. + let promotedSingleSeries = false; if ( where.length === 0 && Array.isArray(config.select) && @@ -1231,10 +1243,15 @@ export function buildEventsSearchUrl({ ) { where = config.select[0].aggCondition ?? ''; whereLanguage = config.select[0].aggConditionLanguage ?? 'lucene'; + promotedSingleSeries = true; } const additionalFilters: Filter[] = []; + if (!promotedSingleSeries && seriesCondition != null) { + additionalFilters.push(seriesCondition); + } + // Add group-by column filters if (groupFilters && groupFilters.length > 0) { groupFilters.forEach(({ column, value }) => { diff --git a/packages/app/src/__tests__/eventsSearchUrl.test.ts b/packages/app/src/__tests__/eventsSearchUrl.test.ts index 57c6c41dc7..36fbb6111e 100644 --- a/packages/app/src/__tests__/eventsSearchUrl.test.ts +++ b/packages/app/src/__tests__/eventsSearchUrl.test.ts @@ -2,6 +2,7 @@ import { BuilderChartConfigWithDateRange, ChartVariable, DisplayType, + Filter, SourceKind, TLogSource, } from '@hyperdx/common-utils/dist/types'; @@ -190,6 +191,89 @@ describe('buildEventsSearchUrl variable expansion', () => { }); }); +describe('buildEventsSearchUrl series conditions', () => { + const series = (aggCondition: string) => ({ + ...builderConfig.select[0], + aggCondition, + }); + + const buildWithSeriesCondition = ( + overrides: Partial, + seriesCondition: Filter, + ) => + buildEventsSearchUrl({ + source: logSource, + config: { ...builderConfig, ...overrides }, + dateRange, + seriesCondition, + }); + + const filtersOf = (url: string | null) => + JSON.parse(searchParams(url).get('filters') ?? ''); + + it('applies the clicked series condition on a multi-series chart', () => { + const url = buildWithSeriesCondition( + { select: [series("ServiceName:'foo'"), series("ServiceName:'bar'")] }, + { type: 'lucene', condition: "ServiceName:'foo'" }, + ); + + expect(searchParams(url).get('where')).toBe(''); + expect(filtersOf(url)).toEqual([ + { type: 'lucene', condition: "ServiceName:'foo'" }, + ]); + }); + + it('ANDs the series condition with the chart-level where and filters', () => { + const url = buildWithSeriesCondition( + { + select: [series("ServiceName:'foo'"), series("ServiceName:'bar'")], + where: "Env = 'prod'", + whereLanguage: 'sql', + filters: [{ type: 'sql', condition: "Region = 'us-east-1'" }], + }, + { type: 'lucene', condition: "ServiceName:'foo'" }, + ); + + const params = searchParams(url); + expect(params.get('where')).toBe("Env = 'prod'"); + expect(params.get('whereLanguage')).toBe('sql'); + expect(filtersOf(url)).toEqual([ + { type: 'sql', condition: "Region = 'us-east-1'" }, + { type: 'lucene', condition: "ServiceName:'foo'" }, + ]); + }); + + // A single series' condition already lands in `where`; adding it again as a + // filter would show the user the same predicate twice. + it('does not duplicate a single series condition promoted into where', () => { + const url = buildWithSeriesCondition( + { select: [series("ServiceName:'foo'")] }, + { type: 'lucene', condition: "ServiceName:'foo'" }, + ); + + expect(searchParams(url).get('where')).toBe("ServiceName:'foo'"); + expect(filtersOf(url)).toEqual([]); + }); + + // Promotion is skipped when the chart has its own `where`, so the series + // condition would otherwise be dropped entirely. + it('keeps a single series condition that cannot be promoted', () => { + const url = buildWithSeriesCondition( + { + select: [series("ServiceName:'foo'")], + where: "Env = 'prod'", + whereLanguage: 'sql', + }, + { type: 'lucene', condition: "ServiceName:'foo'" }, + ); + + expect(searchParams(url).get('where')).toBe("Env = 'prod'"); + expect(filtersOf(url)).toEqual([ + { type: 'lucene', condition: "ServiceName:'foo'" }, + ]); + }); +}); + describe('buildTableRowSearchUrl variable expansion', () => { const tableConfig = { ...builderConfig, diff --git a/packages/app/src/components/DBTimeChart.tsx b/packages/app/src/components/DBTimeChart.tsx index 1ae67bcbb8..1b9accbf75 100644 --- a/packages/app/src/components/DBTimeChart.tsx +++ b/packages/app/src/components/DBTimeChart.tsx @@ -8,6 +8,7 @@ import React, { useState, } from 'react'; import { add, differenceInSeconds } from 'date-fns'; +import { isRatioChartConfig } from '@hyperdx/common-utils/dist/core/renderChartConfig'; import { convertGranularityToSeconds, getAlignedDateRange, @@ -21,6 +22,7 @@ import { BuilderChartConfigWithDateRange, ChartConfigWithDateRange, DisplayType, + Filter, } from '@hyperdx/common-utils/dist/types'; import { Popover, Portal } from '@mantine/core'; import { IconChartBar, IconChartLine } from '@tabler/icons-react'; @@ -38,7 +40,10 @@ import { useTimeChartSettings, } from '@/ChartUtils'; import { ChartAnnotation } from '@/components/charts/chartAnnotations'; -import { ChartSeriesTooltip } from '@/components/charts/ChartSeriesTooltip'; +import { + ChartSeriesTooltip, + type ClickedSeries, +} from '@/components/charts/ChartSeriesTooltip'; import { useChartTooltipZIndex } from '@/components/charts/ChartTooltip'; import { MAX_LOADABLE_TIME_CHART_SERIES, @@ -50,6 +55,7 @@ import { useQueriedChartConfig, } from '@/hooks/useChartConfig'; import { useMVOptimizationExplanation } from '@/hooks/useMVOptimizationExplanation'; +import { aggConditionScopeFilter } from '@/hooks/useReleaseAnnotations'; import { useChartNumberFormats, useSource } from '@/source'; import type { NumberFormat } from '@/types'; @@ -136,6 +142,59 @@ export function decodeSeriesGroupFilters({ return groupFilters; } +/** + * The WHERE the clicked series aggregated over, as a filter for the drill-down + * search. + * + * A builder time chart does not put a series' filter in the statement-level + * `where` — each series carries its own `aggCondition`, applied inside that + * series' aggregate. A search built from chart-level state alone therefore + * spans every series, and its counts don't reconcile with the clicked line. + * + * Value columns map positionally onto `select` (the contract + * `useChartNumberFormats` relies on), so the clicked series' result column + * names the series that produced it. + * + * When no single series can be attributed — a whole-bucket click, a merged + * ratio column, or a formula column — fall back to the union of every series' + * condition, which is the scan scope the chart itself used + * (`aggConditionScopeFilter` yields nothing once any series is unfiltered). + */ +export function resolveSeriesConditionFilter({ + config, + resultColumns, + valueColumnName, +}: { + config: BuilderChartConfigWithDateRange; + /** Result column names in query order, i.e. `data.meta`. */ + resultColumns: string[]; + /** Result column behind the clicked series; absent for a whole-bucket click. */ + valueColumnName?: string; +}): Filter | undefined { + const select = config.select; + if (!Array.isArray(select) || select.length === 0) { + return undefined; + } + + // Ratio configs merge two series into one column, and a formula config with + // hidden operands projects only formula columns — neither lines up with + // `select` positionally (same guard as DBTableChart's per-column colors). + const columnsMapToSelect = + !isRatioChartConfig(select, config) && + !((config.formulas?.length ?? 0) > 0 && config.showOperandSeries === false); + + const index = + columnsMapToSelect && valueColumnName != null + ? resultColumns.indexOf(valueColumnName) + : -1; + const clickedSeries = + index >= 0 && index < select.length ? select[index] : undefined; + + return aggConditionScopeFilter( + clickedSeries != null ? [clickedSeries] : select, + ); +} + // The interactive PINNED tooltip, rendered over the chart in a body-portaled // Mantine Popover anchored at the clicked point. Hover uses the recharts tooltip // in MemoChart instead; this is only for the click-locked state. @@ -153,7 +212,7 @@ function ChartTooltipOverlay({ expanded, }: { payload: ActiveClickPayload | undefined; - buildSearchUrl: (key?: string, value?: number) => string | null; + buildSearchUrl: (series?: ClickedSeries) => string | null; onDismiss: () => void; /** Focus a series by its raw series key (dataKey) and display name. */ onFocusSeries: (payload: { dataKey?: string; name: string }) => void; @@ -717,8 +776,17 @@ function DBTimeChartComponent({ : undefined; }, [activeClickPayload]); + const resultColumns = useMemo( + () => (data?.meta ?? []).map(column => column.name), + [data?.meta], + ); + const buildSearchUrl = useCallback( - (seriesKey?: string, seriesValue?: number) => { + ({ + dataKey: seriesKey, + value: seriesValue, + valueColumnName, + }: ClickedSeries = {}) => { // Raw SQL charts are not supported for drill-down as we don't know the source which is being used. if ( clickedActiveLabelDate == null || @@ -838,6 +906,13 @@ function DBTimeChartComponent({ dateRange: [from, to], groupFilters, valueRangeFilter, + seriesCondition: isBuilderChartConfig(expandedConfig) + ? resolveSeriesConditionFilter({ + config: expandedConfig, + resultColumns, + valueColumnName, + }) + : undefined, }); }, [ @@ -846,6 +921,7 @@ function DBTimeChartComponent({ granularity, source, groupColumns, + resultColumns, valueColumns, isSingleValueColumn, ], diff --git a/packages/app/src/components/__tests__/DBTimeChart.test.tsx b/packages/app/src/components/__tests__/DBTimeChart.test.tsx index e1b6e9543a..82f83b7517 100644 --- a/packages/app/src/components/__tests__/DBTimeChart.test.tsx +++ b/packages/app/src/components/__tests__/DBTimeChart.test.tsx @@ -10,6 +10,7 @@ import DateRangeIndicator from '@/components/charts/DateRangeIndicator'; import { DBTimeChart, decodeSeriesGroupFilters, + resolveSeriesConditionFilter, } from '@/components/DBTimeChart'; import MVOptimizationIndicator from '@/components/MaterializedViews/MVOptimizationIndicator'; import { MAX_LOADABLE_TIME_CHART_SERIES } from '@/defaults'; @@ -708,6 +709,136 @@ describe('DBTimeChart', () => { }); }); + describe('resolveSeriesConditionFilter', () => { + const series = (aggCondition: string, alias?: string) => ({ + aggFn: 'count' as const, + aggCondition, + aggConditionLanguage: 'lucene' as const, + valueExpression: '', + ...(alias != null ? { alias } : {}), + }); + + const configWith = (overrides: Record) => + ({ + ...baseTestConfig, + ...overrides, + }) as any; + + const twoSeriesConfig = configWith({ + select: [ + series("ServiceName:'foo'", 'foo'), + series("ServiceName:'bar'", 'bar'), + ], + }); + + it('resolves the clicked series by its value column', () => { + expect( + resolveSeriesConditionFilter({ + config: twoSeriesConfig, + resultColumns: ['foo', 'bar', '__hdx_time_bucket'], + valueColumnName: 'bar', + }), + ).toEqual({ type: 'lucene', condition: "ServiceName:'bar'" }); + }); + + it('unions every series condition for a whole-bucket click', () => { + expect( + resolveSeriesConditionFilter({ + config: twoSeriesConfig, + resultColumns: ['foo', 'bar', '__hdx_time_bucket'], + }), + ).toEqual({ + type: 'lucene', + condition: "(ServiceName:'foo') OR (ServiceName:'bar')", + }); + }); + + // The chart scans every row once a series is unfiltered, so there is no + // narrower scope to carry into the search. + it('returns nothing when a series has no condition', () => { + expect( + resolveSeriesConditionFilter({ + config: configWith({ + select: [series("ServiceName:'foo'", 'foo'), series('', 'all')], + }), + resultColumns: ['foo', 'all', '__hdx_time_bucket'], + }), + ).toBeUndefined(); + }); + + // Both series feed the single merged column, so neither can be singled out. + it('unions both series of a ratio config rather than attributing one', () => { + expect( + resolveSeriesConditionFilter({ + config: configWith({ + select: [ + series("ServiceName:'foo'", 'foo'), + series("ServiceName:'bar'", 'bar'), + ], + seriesReturnType: 'ratio', + }), + resultColumns: ['foo/bar', '__hdx_time_bucket'], + valueColumnName: 'foo/bar', + }), + ).toEqual({ + type: 'lucene', + condition: "(ServiceName:'foo') OR (ServiceName:'bar')", + }); + }); + + // With operands hidden the projection is formula columns only, so column 0 + // is not select[0]. + it('unions every series when a formula config hides its operands', () => { + expect( + resolveSeriesConditionFilter({ + config: configWith({ + select: [ + series("ServiceName:'foo'", 'foo'), + series("ServiceName:'bar'", 'bar'), + ], + formulas: [{ expression: 'A/B' }], + showOperandSeries: false, + }), + resultColumns: ['A/B', '__hdx_time_bucket'], + valueColumnName: 'A/B', + }), + ).toEqual({ + type: 'lucene', + condition: "(ServiceName:'foo') OR (ServiceName:'bar')", + }); + }); + + // A formula column sits past the operand columns and has no aggCondition. + it('falls back to the union when a formula column is clicked', () => { + expect( + resolveSeriesConditionFilter({ + config: configWith({ + select: [ + series("ServiceName:'foo'", 'foo'), + series("ServiceName:'bar'", 'bar'), + ], + formulas: [{ expression: 'A/B' }], + }), + resultColumns: ['foo', 'bar', 'A/B', '__hdx_time_bucket'], + valueColumnName: 'A/B', + }), + ).toEqual({ + type: 'lucene', + condition: "(ServiceName:'foo') OR (ServiceName:'bar')", + }); + }); + + it('returns nothing for a raw SQL select list', () => { + expect( + resolveSeriesConditionFilter({ + config: configWith({ select: 'count()' }), + resultColumns: ['count()'], + valueColumnName: 'count()', + }), + ).toBeUndefined(); + }); + }); + it('does not render DateRangeIndicator when MV optimization has no optimized date range and showDateRangeIndicator is false', () => { // Mock useMVOptimizationExplanation to return data without an optimized config jest.mocked(useMVOptimizationExplanation).mockReturnValue({ diff --git a/packages/app/src/components/charts/ChartSeriesTooltip.tsx b/packages/app/src/components/charts/ChartSeriesTooltip.tsx index eb31ec06c0..49f65bdb0f 100644 --- a/packages/app/src/components/charts/ChartSeriesTooltip.tsx +++ b/packages/app/src/components/charts/ChartSeriesTooltip.tsx @@ -155,6 +155,16 @@ function SeriesRow({ ); } +/** The series a drill-down action was invoked on. */ +export type ClickedSeries = { + /** Full series key, e.g. "count · error · api". */ + dataKey?: string; + /** The series' value at the clicked bucket. */ + value?: number; + /** Result column the series was plotted from; identifies its `select` entry. */ + valueColumnName?: string; +}; + export type ChartSeriesTooltipProps = { /** Bucket label (epoch seconds as a string) for the timestamp header. */ activeLabel: string; @@ -164,8 +174,8 @@ export type ChartSeriesTooltipProps = { /** Per-value-column number formats, keyed by result column name. */ numberFormatByKey: Map; previousPeriodOffsetSeconds?: number; - /** Drill-down URL for the whole bucket (no args) or one series (key + value). */ - buildSearchUrl?: (key?: string, value?: number) => string | null; + /** Drill-down URL for the whole bucket (no args) or for one clicked series. */ + buildSearchUrl?: (series?: ClickedSeries) => string | null; /** Dismiss the tooltip (used by links + focus). */ onDismiss?: () => void; /** Focus a series by its raw key + display name. */ @@ -326,10 +336,13 @@ export function ChartSeriesTooltip({ : undefined) ?? fallbackNumberFormat; const seriesUrl = showPerSeriesActions && canDrillDown - ? (buildSearchUrl!( - payload.dataKey, - Number.isFinite(payload.value) ? payload.value : undefined, - ) ?? bucketSearchUrl) + ? (buildSearchUrl!({ + dataKey: payload.dataKey, + value: Number.isFinite(payload.value) + ? payload.value + : undefined, + valueColumnName: payload.valueColumnName, + }) ?? bucketSearchUrl) : undefined; return ( { expect(onDismiss).toHaveBeenCalledTimes(1); }); + // The per-series WHERE lives on the series' `select` entry, which the caller + // can only find from the result column the series was plotted from. + it('identifies the clicked series by its value column when building its Search URL', () => { + const buildSearchUrl = jest.fn( + (series?: { dataKey?: string }) => `/search?series=${series?.dataKey}`, + ); + + renderWithMantine( + , + ); + + expect(buildSearchUrl).toHaveBeenCalledWith(); + expect(buildSearchUrl).toHaveBeenCalledWith({ + dataKey: 'error', + value: 90, + valueColumnName: 'error', + }); + expect(buildSearchUrl).toHaveBeenCalledWith({ + dataKey: 'warn', + value: 10, + valueColumnName: 'warn', + }); + expect(screen.getByTestId('chart-view-events-link-error')).toHaveAttribute( + 'href', + '/search?series=error', + ); + }); + it('renders no tooltip content when every series value is non-finite', () => { renderWithMantine( Date: Tue, 22 Sep 2026 07:03:11 +0000 Subject: [PATCH 2/3] test(app): type the resolveSeriesConditionFilter fixtures instead of casting Keeps the app 'as any' ratchet at its baseline. Co-authored-by: Mike Shi --- .../src/components/__tests__/DBTimeChart.test.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/app/src/components/__tests__/DBTimeChart.test.tsx b/packages/app/src/components/__tests__/DBTimeChart.test.tsx index 82f83b7517..dd01de8515 100644 --- a/packages/app/src/components/__tests__/DBTimeChart.test.tsx +++ b/packages/app/src/components/__tests__/DBTimeChart.test.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { BuilderChartConfigWithDateRange } from '@hyperdx/common-utils/dist/types'; import { MantineProvider } from '@mantine/core'; import { Notifications } from '@mantine/notifications'; import { screen, waitFor } from '@testing-library/react'; @@ -718,11 +719,12 @@ describe('DBTimeChart', () => { ...(alias != null ? { alias } : {}), }); - const configWith = (overrides: Record) => - ({ - ...baseTestConfig, - ...overrides, - }) as any; + const configWith = ( + overrides: Partial, + ): BuilderChartConfigWithDateRange => ({ + ...baseTestConfig, + ...overrides, + }); const twoSeriesConfig = configWith({ select: [ From 2ce2db9edfb0e3b9099b0a4e14828178d570e311 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 16 Oct 2026 17:43:06 +0000 Subject: [PATCH 3/3] docs(app): note mixed-language series fall back to an unscoped search The search URL ANDs its filters and carries a single where language, so it cannot OR a SQL series condition with a Lucene one; the union fallback leaves the search unscoped in that case. Pin that, and that a clicked series in such a chart still resolves to its own condition, with tests. Co-authored-by: Mike Shi --- packages/app/src/components/DBTimeChart.tsx | 3 ++ .../components/__tests__/DBTimeChart.test.tsx | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/packages/app/src/components/DBTimeChart.tsx b/packages/app/src/components/DBTimeChart.tsx index f7680b03eb..96a8eed84e 100644 --- a/packages/app/src/components/DBTimeChart.tsx +++ b/packages/app/src/components/DBTimeChart.tsx @@ -166,6 +166,9 @@ export function decodeSeriesGroupFilters({ * ratio column, or a formula column — fall back to the union of every series' * condition, which is the scan scope the chart itself used * (`aggConditionScopeFilter` yields nothing once any series is unfiltered). + * Series mixing SQL and Lucene conditions also yield nothing: the search URL + * ANDs its filters and carries one `where` language, so it has no way to OR + * them, and an unscoped search is the safe superset. */ export function resolveSeriesConditionFilter({ config, diff --git a/packages/app/src/components/__tests__/DBTimeChart.test.tsx b/packages/app/src/components/__tests__/DBTimeChart.test.tsx index 5ddfdca178..1851efaa9e 100644 --- a/packages/app/src/components/__tests__/DBTimeChart.test.tsx +++ b/packages/app/src/components/__tests__/DBTimeChart.test.tsx @@ -764,6 +764,43 @@ describe('DBTimeChart', () => { ).toBeUndefined(); }); + // The search URL can't OR a SQL condition with a Lucene one. + it('returns nothing when the series conditions mix languages', () => { + expect( + resolveSeriesConditionFilter({ + config: configWith({ + select: [ + series("ServiceName:'foo'", 'foo'), + { + ...series("ServiceName = 'bar'", 'bar'), + aggConditionLanguage: 'sql', + }, + ], + }), + resultColumns: ['foo', 'bar', '__hdx_time_bucket'], + }), + ).toBeUndefined(); + }); + + // A clicked series still resolves even when its siblings use another language. + it('resolves the clicked series in a mixed-language chart', () => { + expect( + resolveSeriesConditionFilter({ + config: configWith({ + select: [ + series("ServiceName:'foo'", 'foo'), + { + ...series("ServiceName = 'bar'", 'bar'), + aggConditionLanguage: 'sql', + }, + ], + }), + resultColumns: ['foo', 'bar', '__hdx_time_bucket'], + valueColumnName: 'bar', + }), + ).toEqual({ type: 'sql', condition: "ServiceName = 'bar'" }); + }); + // Both series feed the single merged column, so neither can be singled out. it('unions both series of a ratio config rather than attributing one', () => { expect(