Skip to content
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(sql): split_part returning old data when no match is found #4493

Merged
merged 10 commits into from
May 18, 2024

Conversation

nwoolmer
Copy link
Contributor

@nwoolmer nwoolmer commented May 10, 2024

Closes #4489

Previously, the function could early return in the non-matching case without clearing the sink.

The fix is to clear it at the top of the function.

The fix is to split the impls so that the local sinks are cleared, and the remote sink not cleared, refactoring the original end-of-function check.

@nwoolmer nwoolmer added Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution ready for review labels May 10, 2024
@ideoma
Copy link
Collaborator

ideoma commented May 18, 2024

[PR Coverage check]

😍 pass : 52 / 74 (70.27%)

file detail

path covered line new line coverage
🔵 io/questdb/griffin/engine/functions/str/SplitPartFunctionFactory.java 22 33 66.67%
🔵 io/questdb/griffin/engine/functions/str/SplitPartCharFunctionFactory.java 4 6 66.67%
🔵 io/questdb/griffin/engine/functions/str/SplitPartVarcharFunctionFactory.java 26 35 74.29%

@bluestreak01 bluestreak01 merged commit b302ff8 into master May 18, 2024
24 checks passed
@bluestreak01 bluestreak01 deleted the nw_split_part_fix branch May 18, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Incorrect or unexpected behavior ready for review SQL Issues or changes relating to SQL execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

split_part returns result from previous row when current row does not have the part
3 participants