Skip to content

test(infinity): cover SQL literal escaping - #18956

Merged
JinHai-CN merged 2 commits into
infiniflow:mainfrom
huyua9:fix/infinity-condition-escape-regressions-huyua9
Sep 11, 2026
Merged

JinHai-CN merged 2 commits into
infiniflow:mainfrom
huyua9:fix/infinity-condition-escape-regressions-huyua9

Conversation

@huyua9

@huyua9 huyua9 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Infinity filters are assembled as SQL strings and must double apostrophes in field-keyword lists, field-keyword scalars, plain lists, and plain string values.

The implementation already performs this escaping; add focused regression coverage so future edits do not reopen malformed filter literals.

Validation:

  • python3 -m compileall: passed
  • git diff --check: passed
  • Focused pytest: unavailable in this environment (No module named pytest)

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. ♾️infinity Pull requests that‘s involved with infinity(DB) 🧪 test Pull requests that update test cases. labels Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview 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: fc86642a-6fac-4f2e-bebf-22f8f8458ce5

📥 Commits

Reviewing files that changed from the base of the PR and between d4b3231 and b5e61b4.

📒 Files selected for processing (1)
  • test/unit_test/common/test_infinity_condition.py

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


📝 Walkthrough

Walkthrough

The change adds unit tests for apostrophe escaping in filter_fulltext, IN, and equality conditions for list and scalar values.

Changes

Infinity condition escaping

Layer / File(s) Summary
Apostrophe escaping coverage
test/unit_test/common/test_infinity_condition.py
Adds tests for doubled apostrophes in filter_fulltext, IN, and equality predicates for list and scalar conditions.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: annasusu

Merge Risk: ⚪ Minimal · up to b5e61

This change adds coverage for existing apostrophe escaping behavior without changing production code, so no merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: regression tests for SQL literal escaping in Infinity filters.
Description check ✅ Passed The description explains the purpose, covered cases, existing implementation behavior, and validation results. It does not use the template's "### Summary" heading, but the required summary informatio…
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.
  • Fix all pre-merge checks with AI

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 reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

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

@JinHai-CN JinHai-CN added the ci Continue Integration label Sep 11, 2026
@codecov

codecov Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.35%. Comparing base (2e6003c) to head (b5e61b4).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18956      +/-   ##
==========================================
- Coverage   37.37%   37.35%   -0.02%     
==========================================
  Files          54       54              
  Lines       15374    15384      +10     
  Branches      125      125              
==========================================
+ Hits         5746     5747       +1     
- Misses       9601     9610       +9     
  Partials       27       27              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JinHai-CN
JinHai-CN merged commit 842c7ce into infiniflow:main Sep 11, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration ♾️infinity Pull requests that‘s involved with infinity(DB) size:XS This PR changes 0-9 lines, ignoring generated files. 🧪 test Pull requests that update test cases.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants