File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @hyperdx/app " : patch
3+ ---
4+
5+ fix: Fix pattern sample query for sources with multi-column timestamp expressions
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 TIMESTAMP_COLUMN_ALIAS ,
1414} from '@/hooks/usePatterns' ;
1515import useRowWhere from '@/hooks/useRowWhere' ;
16+ import { getFirstTimestampValueExpression } from '@/source' ;
1617import { useZIndex , ZIndexContext } from '@/zIndex' ;
1718
1819import styles from '../../styles/LogSidePanel.module.scss' ;
@@ -74,7 +75,7 @@ export default function PatternSidePanel({
7475 ] ,
7576 aliasMap : {
7677 body : bodyValueExpression ,
77- ts : source . timestampValueExpression ,
78+ ts : getFirstTimestampValueExpression ( source . timestampValueExpression ) ,
7879 } ,
7980 } ) ;
8081
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 useConfigWithPrimaryAndPartitionKey ,
1414} from '@/components/DBRowTable' ;
1515import { useQueriedChartConfig } from '@/hooks/useChartConfig' ;
16+ import { getFirstTimestampValueExpression } from '@/source' ;
1617
1718// We don't want to load pyodide over and over again, use react query to cache the async instance
1819function usePyodide ( options : { enabled : boolean } ) {
@@ -131,7 +132,7 @@ function usePatterns({
131132 // TODO: User-configurable pattern columns and non-pattern/group by columns
132133 select : [
133134 `${ bodyValueExpression } as ${ PATTERN_COLUMN_ALIAS } ` ,
134- `${ config . timestampValueExpression } as ${ TIMESTAMP_COLUMN_ALIAS } ` ,
135+ `${ getFirstTimestampValueExpression ( config . timestampValueExpression ) } as ${ TIMESTAMP_COLUMN_ALIAS } ` ,
135136 ...( severityTextExpression
136137 ? [ `${ severityTextExpression } as ${ SEVERITY_TEXT_COLUMN_ALIAS } ` ]
137138 : [ ] ) ,
You can’t perform that action at this time.
0 commit comments