Skip to content

fix(metadata): preserve string arrays in in-memory filters - #21065

Merged
wangq8 merged 2 commits into
infiniflow:mainfrom
QAQadws:codex/fix-metadata-filter-array-values
Oct 16, 2026
Merged

wangq8 merged 2 commits into
infiniflow:mainfrom
QAQadws:codex/fix-metadata-filter-array-values

Conversation

@QAQadws

@QAQadws QAQadws commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Manual in/not in selections send string arrays from the frontend, but the backend incorrectly converted them into empty arrays, causing in to match nothing and not in to lose its exclusions. Preserve valid string arrays and make conditions containing non-string array members match nothing, while retaining existing comma-separated string handling.

@QAQadws QAQadws added the ci Continue Integration label Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7422d843-6ecc-49a7-bdf5-ccc82a7588a3
📥 Commits

Reviewing files that changed from the base of the PR and between 012a59e and 6f62f1e.

📒 Files selected for processing: 2
  • internal/service/metadata_filter.go
  • internal/service/metadata_filter_test.go

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The change updates conversion of in and not in metadata filter values. It preserves arrays containing only strings, sets arrays with non-string members to nil, and leaves other non-string values unchanged. New tests cover array inputs and manual filtering.

Changes: Metadata membership filters

Layer / File(s) Summary
Membership value conversion and validation
internal/service/metadata_filter.go, internal/service/metadata_filter_test.go
convertToMetaCondition preserves string arrays for in and not in, and sets arrays with non-string members to nil. Tests cover array matching, literal comma-containing values, invalid array members, and manual not in filtering without dataset IDs.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: wangq8

Merge Risk: ⚪ Minimal · up to 6f62f

Manual in/not in metadata filters now keep their string-array selections instead of turning them into empty arrays. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the metadata fix and the preservation of string arrays in in-memory filters.
Description check Passed The description clearly explains the problem, intended behavior, invalid-input handling, and preservation of existing comma-separated string handling. It omits the template's "### Summary" heading, bu…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the problem, intended behavior, invalid-input handling, and preservation of existing comma-separated string handling. It omits the template's "### Summary" heading, but the required content is present.

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the list of strings
And hops past values with odd things
“In” and “not in” now parse with care
Comma-bound words stay whole in there
The test burrow finds each case
Then leaves a neat and quiet trace

Comment @coderabbitai help to get the list of available commands.

@QAQadws
QAQadws requested a review from Lynn-Inf October 16, 2026 07:44

@Lynn-Inf Lynn-Inf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@QAQadws
QAQadws requested a review from wangq8 October 16, 2026 11:20
@wangq8
wangq8 merged commit f9233c8 into infiniflow:main Oct 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants