diff --git a/packages/time-series/lib/commands/index.ts b/packages/time-series/lib/commands/index.ts index 356b0416648..38f987bb247 100644 --- a/packages/time-series/lib/commands/index.ts +++ b/packages/time-series/lib/commands/index.ts @@ -179,7 +179,7 @@ export function pushDuplicatePolicy(args: RedisCommandArguments, duplicatePolicy export type RawLabels = Array<[label: string, value: string]>; export type Labels = { - [label: string]: string; + [label: string]: string | Array; }; export function transformLablesReply(reply: RawLabels): Labels { @@ -197,7 +197,13 @@ export function pushLabelsArgument(args: RedisCommandArguments, labels?: Labels) args.push('LABELS'); for (const [label, value] of Object.entries(labels)) { - args.push(label, value); + if (Array.isArray(value)) { + for (const item of value) { + args.push(label, item); + } + } else { + args.push(label, value); + } } }