Skip to content

fix: fix local mode values count#1191

Merged
joein merged 1 commit intodevfrom
fix-values-count-congruence
Apr 14, 2026
Merged

fix: fix local mode values count#1191
joein merged 1 commit intodevfrom
fix-values-count-congruence

Conversation

@joein
Copy link
Copy Markdown
Member

@joein joein commented Apr 13, 2026

@joein joein requested a review from tbung April 13, 2026 16:46
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 13, 2026

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit 7791455
🔍 Latest deploy log https://app.netlify.com/projects/poetic-froyo-8baba7/deploys/69dd1dc46cf02300085fb336
😎 Deploy Preview https://deploy-preview-1191--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4f5a63a9-37ae-4b81-8198-3573746ecb11

📥 Commits

Reviewing files that changed from the base of the PR and between df76e0b and 7791455.

📒 Files selected for processing (2)
  • qdrant_client/local/payload_filters.py
  • tests/congruence_tests/test_values_count.py

📝 Walkthrough

Walkthrough

This pull request modifies the get_value_counts function in the payload filters module to refine how it determines countable values. The logic now treats only list objects as countable collections, whereas previously it counted any non-string object with a __len__ attribute. A new comprehensive test module has been added to validate this behavior across local and remote Qdrant clients using multiple filter operators (gt, gte, lt, lte) and various payload scenarios including dictionaries, lists, scalars, null values, and missing keys.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: fixing the values count functionality in local mode, which aligns with the payload_filters.py modification.
Description check ✅ Passed The description references issue #1189 which provides context for the fix, though minimal detail is given.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-values-count-congruence

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

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

if value is None:
counts.append(0)
elif hasattr(value, "__len__") and not isinstance(value, str):
elif isinstance(value, list):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

collections.abc.Sequence would probably be the generalized/more robust check here, but I guess it doesn't matter since we control what types go here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

when we add a point to a collection we serialize it to json and then deserialize, so I guess there should not be any tough types and list should be enough

@joein joein merged commit 1c1e1c5 into dev Apr 14, 2026
12 checks passed
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.

2 participants