-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix crash in rewrite call subquery #604
Conversation
WalkthroughThis update introduces an enhancement to the handling of call subqueries within the codebase, specifically focusing on the retrieval of queries before updating union indices. Additionally, it includes a new test case designed to verify the correct execution of complex queries involving nested FOREACH and UNION operations within a CALL block. Changes
Assessment against linked issues
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (2)
- src/ast/ast_rewrite_call_subquery.c (1 hunks)
- tests/flow/test_call_subquery.py (1 hunks)
Additional comments not posted (2)
src/ast/ast_rewrite_call_subquery.c (1)
428-429
: The change to retrieve the query from a call subquery again after potentially modifying its structure is a necessary step to ensure the integrity of the query execution process. This aligns with the PR objectives to fix a crash issue during the rewrite call of a subquery. However, it's recommended to evaluate the performance impact of this additional retrieval to ensure it does not introduce unnecessary overhead.tests/flow/test_call_subquery.py (1)
2107-2122
: The newly added testtest32_rewrite_callsubquery
correctly implements a complex query scenario involving nestedFOREACH
,MERGE
, andUNION
within aCALL
block. This test is crucial for validating the fix for the crash issue described in the PR objectives. The structure and assertion of the test are consistent with the existing tests in the file, ensuring the expected behavior of the query is met without causing a crash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (1)
- tests/flow/test_call_subquery.py (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- tests/flow/test_call_subquery.py
* 600 add browser usage for the docker image (#601) * add instructions to run browser UI * set hostname to 0.0.0.0 * fix crash in rewrite call subquery (#604) * fix crash in rewrite call subquery * simplified test query --------- Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * use debug assert in rust (#606) * fix merge init (#609) * fix merge init * remove unused function, simplified branch assignment logic * clean --------- Co-authored-by: Roi Lipman <roilipman@gmail.com> * Unwind persist (#613) * persist unwind record * deep clone base record * Disable jit (#612) * persist unwind record * disable GraphBLAS JIT * version bump --------- Co-authored-by: Dudi <16744955+dudizimber@users.noreply.github.com> Co-authored-by: Avi Avni <avi.avni@gmail.com>
* 600 add browser usage for the docker image (#601) * add instructions to run browser UI * set hostname to 0.0.0.0 * fix crash in rewrite call subquery (#604) * fix crash in rewrite call subquery * simplified test query --------- Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * use debug assert in rust (#606) * fix merge init (#609) * fix merge init * remove unused function, simplified branch assignment logic * clean --------- Co-authored-by: Roi Lipman <roilipman@gmail.com> * Unwind persist (#613) * persist unwind record * deep clone base record * Disable jit (#612) * persist unwind record * disable GraphBLAS JIT * Update module api (#617) * update RediSearch submodule * bump RediSearch version * updated redis module api header file * make sure there's a record to emit (#623) * update RediSearch (#640) * bump version --------- Co-authored-by: Dudi <16744955+dudizimber@users.noreply.github.com> Co-authored-by: Avi Avni <avi.avni@gmail.com>
* 600 add browser usage for the docker image (#601) * add instructions to run browser UI * set hostname to 0.0.0.0 * fix crash in rewrite call subquery (#604) * fix crash in rewrite call subquery * simplified test query --------- Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * use debug assert in rust (#606) * fix merge init (#609) * fix merge init * remove unused function, simplified branch assignment logic * clean --------- Co-authored-by: Roi Lipman <roilipman@gmail.com> * Unwind persist (#613) * persist unwind record * deep clone base record * Disable jit (#612) * persist unwind record * disable GraphBLAS JIT * Update module api (#617) * update RediSearch submodule * bump RediSearch version * updated redis module api header file * make sure there's a record to emit (#623) * update RediSearch (#640) * Fix #634 Add Cloud link to README.md (#635) * fix #645 Add objective to README (#646) * Add objective to README * Update wordlist.txt --------- Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * fix union validation with call subquery (#648) * Seek by id runtime optimization (#643) * wip runtime optimization * fix leak * fix node by label scan * fix leak * fix leak * address review * add tests * address review * review * review * review * add memory hook to roaring bitmap * introduce bitmap range --------- Co-authored-by: Roi Lipman <roilipman@gmail.com> Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * bump version --------- Co-authored-by: Dudi <16744955+dudizimber@users.noreply.github.com> Co-authored-by: Avi Avni <avi.avni@gmail.com> Co-authored-by: Guy Korland <gkorland@gmail.com>
* 600 add browser usage for the docker image (#601) * add instructions to run browser UI * set hostname to 0.0.0.0 * fix crash in rewrite call subquery (#604) * fix crash in rewrite call subquery * simplified test query --------- Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * use debug assert in rust (#606) * fix merge init (#609) * fix merge init * remove unused function, simplified branch assignment logic * clean --------- Co-authored-by: Roi Lipman <roilipman@gmail.com> * Unwind persist (#613) * persist unwind record * deep clone base record * Disable jit (#612) * persist unwind record * disable GraphBLAS JIT * Update module api (#617) * update RediSearch submodule * bump RediSearch version * updated redis module api header file * make sure there's a record to emit (#623) * update RediSearch (#640) * Fix #634 Add Cloud link to README.md (#635) * fix #645 Add objective to README (#646) * Add objective to README * Update wordlist.txt --------- Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * fix union validation with call subquery (#648) * Seek by id runtime optimization (#643) * wip runtime optimization * fix leak * fix node by label scan * fix leak * fix leak * address review * add tests * address review * review * review * review * add memory hook to roaring bitmap * introduce bitmap range --------- Co-authored-by: Roi Lipman <roilipman@gmail.com> Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com> * zero dim vector save/load (#654) * update redisearch, do not escape TAG field (#667) * Code coverage (#674) * add coverage build * rename * fix * fix cache * install redis in coverage * ignore some path in code coverage (#678) * Ref count record (#663) * ref count record * nullify record on deletion * handle record ref count within execution plan return record * address PR comments * remove head & tail calls to persist * trying to simplify and make value passing safer and simpler * free aggregated group once yield * removed Record_PersistScalars * removed override flag * remove extra persists * group no longer holds a keys array * only persists keys which are not graph entities * allow for record cloning from different execution plans --------- Co-authored-by: Dudi <16744955+dudizimber@users.noreply.github.com> Co-authored-by: Avi Avni <avi.avni@gmail.com> Co-authored-by: Guy Korland <gkorland@gmail.com>
fix #605
Summary by CodeRabbit
Summary by CodeRabbit