Skip to content

Key the IN list cache by the values with their types to close #2912 - #2913

Merged
mathiasrw merged 1 commit into
developfrom
fix/2912
Oct 28, 2026
Merged

mathiasrw merged 1 commit into
developfrom
fix/2912

Conversation

@mathiasrw

Copy link
Copy Markdown
Member

Closes #2912. The IN and NOT IN list cache keyed each Set by the values joined with commas, so IN (5, 6) and IN ('5', '6') shared one set, and so did IN ('a,b') and IN ('a', 'b'). The key is now JSON.stringify of the values, which keeps their type and keeps a comma inside a value apart from the commas between values. The generated code reads the set through that key as a string literal.

test/test2912.js checks numbers and strings in both orders, NOT IN, a value with a comma, and values with quotes and backslashes. All five fail on develop and pass here. Full suite 2476 pass, 0 fail.

@mathiasrw mathiasrw added this to the v4.x Focus milestone Oct 28, 2026
@mathiasrw
mathiasrw merged commit 9932ac9 into develop Oct 28, 2026
10 checks passed
komal0000 added a commit to komal0000/alasql that referenced this pull request Oct 29, 2026
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.

IN (5, 6) and IN ('5', '6') share one cached set, so the result depends on which query ran first

1 participant