Skip to content

lib/logstorage: add pipe json_array_concat#1408

Open
cuongleqq wants to merge 4 commits into
VictoriaMetrics:masterfrom
cuongleqq:add-pipe-json-array-concat
Open

lib/logstorage: add pipe json_array_concat#1408
cuongleqq wants to merge 4 commits into
VictoriaMetrics:masterfrom
cuongleqq:add-pipe-json-array-concat

Conversation

@cuongleqq
Copy link
Copy Markdown
Contributor

Closes #712

This PR adds the json_array_concat pipe for joining JSON array items stored in a log field into a single string with a given delimiter.

Syntax: json_array_concat [delimiter] [from <src_field>] [as <result_field>]

  • delimiter is optional, defaults to empty string (items concatenated without separator)
  • from <src_field> is optional, defaults to _msg
  • as <result_field> is optional, defaults to <src_field> (in-place)

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="lib/logstorage/pipe_json_array_concat.go">

<violation number="1" location="lib/logstorage/pipe_json_array_concat.go:135">
P2: Leading whitespace causes valid JSON arrays to be rejected before parsing, so the pipe returns an empty string for inputs the JSON parser accepts.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread lib/logstorage/pipe_json_array_concat.go
@func25 func25 self-assigned this May 18, 2026
@cuongleqq cuongleqq force-pushed the add-pipe-json-array-concat branch from 64393a4 to 7bbc170 Compare May 18, 2026 09:12
@cuongleqq cuongleqq force-pushed the add-pipe-json-array-concat branch from 7bbc170 to d0dccc7 Compare May 18, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

logsql: feature join multiple log entries into single

3 participants