Skip to content

[8.0] MOD-10153: New APPLY function case()#6355

Merged
redisearch-backport-pull-request[bot] merged 3 commits into8.0from
backport-6332-to-8.0
Jun 26, 2025
Merged

[8.0] MOD-10153: New APPLY function case()#6355
redisearch-backport-pull-request[bot] merged 3 commits into8.0from
backport-6332-to-8.0

Conversation

@redisearch-backport-pull-request
Copy link
Copy Markdown
Contributor

@redisearch-backport-pull-request redisearch-backport-pull-request bot commented Jun 20, 2025

Description

Backport of #6332 to 8.0.

Changes:

  • case() is guarded by search-enable-unstable-features

* WIP: Implement func_case

* Add tests

* Test nested case

* Rename testNestedCase to testNestedCaseAndGroup

* Add test for invalid apply expressions

* Remove TODO comment

* Fix flaky test

* Test with document which doesn't have neither of the fields.

* Add unit tests

* Add tests for NULL and missing fields

* Add more unit tests

* refactor evalFuncCase and update test cases for func_case handling

* Fix typo

* Refactor testCaseWithLogicalOperators and testCaseWithMissingFields to improve product classification and result validation

* Add test with deep nesting of case

* One more simple test

---------

Co-authored-by: oshadmi <omer.shadmi@redis.com>
(cherry picked from commit f338602)
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 20, 2025

Codecov Report

Attention: Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.83%. Comparing base (d784665) to head (46a248e).
Report is 2 commits behind head on 8.0.

Files with missing lines Patch % Lines
src/aggregate/functions/string.c 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.0    #6355      +/-   ##
==========================================
- Coverage   88.84%   88.83%   -0.01%     
==========================================
  Files         201      201              
  Lines       37422    37441      +19     
==========================================
+ Hits        33246    33262      +16     
- Misses       4176     4179       +3     
Flag Coverage Δ
flow 83.36% <89.47%> (-0.08%) ⬇️
unit 42.42% <68.42%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@nafraf nafraf requested a review from raz-mon June 24, 2025 21:25
Copy link
Copy Markdown
Collaborator

@raz-mon raz-mon left a comment

Choose a reason for hiding this comment

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

👌

@redisearch-backport-pull-request redisearch-backport-pull-request bot added this pull request to the merge queue Jun 26, 2025
Merged via the queue into 8.0 with commit d53a574 Jun 26, 2025
9 checks passed
@redisearch-backport-pull-request redisearch-backport-pull-request bot deleted the backport-6332-to-8.0 branch June 26, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants