File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -297,12 +297,6 @@ export function transformGreptimeDBLogs(sqlResponse: GreptimeResponse, query: CH
297
297
}
298
298
} ) ;
299
299
}
300
-
301
-
302
- // if (timestampColumnIndex === -1 || bodyColumnIndex === -1) {
303
- // console.error('Timestamp or body column not found in GreptimeDB response.');
304
- // return null;
305
- // }
306
300
307
301
const timestamps : number [ ] = [ ] ;
308
302
const bodies : string [ ] = [ ] ;
@@ -318,9 +312,13 @@ export function transformGreptimeDBLogs(sqlResponse: GreptimeResponse, query: CH
318
312
? new Date ( timestampValue ) . getTime ( )
319
313
: timestampValue
320
314
) ;
321
- bodies . push ( String ( row [ bodyColumnIndex ] ) ) ;
322
- severities . push ( severityColumnIndex !== - 1 ? String ( row [ severityColumnIndex ] ) : '' ) ;
323
- ids . push ( idColumnIndex !== - 1 ? String ( row [ idColumnIndex ] ) : '' ) ;
315
+ if ( bodyColumnIndex !== - 1 ) {
316
+ bodies . push ( String ( row [ bodyColumnIndex ] ) ) ;
317
+ }
318
+ if ( severityColumnIndex !== - 1 ) {
319
+ severities . push ( String ( row [ severityColumnIndex ] ) ) ;
320
+ }
321
+
324
322
325
323
const labels : Record < string , any > = { } ;
326
324
for ( const labelName in labelColumnIndices ) {
You can’t perform that action at this time.
0 commit comments