AlaSQL / alasql

AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.
http://alasql.org
MIT License
7.01k stars 650 forks source link

4.2.0 regression : basic query using 'in' keyword working 4.1.11 and returning no result in 4.2.0 #1829

Closed jbrazeau closed 10 months ago

jbrazeau commented 10 months ago

I've upgraded alasql (4.1.10 -> 4.2.0) this morning and faced a regression.

I've isolated the problem in a trivial test available in the following git repository : https://gitlab.com/jean-francois.brazeau/alasql-bug-4.2.0

The repository contains a very basic test that :

Simply run :

paulrutter commented 10 months ago

Performance improvements yesterday were indeed affecting IN and NOT IN, so it seems something was missed in the unit test coverage. I did add a similar test though, so not sure what causes it yet. I might investigate next week.

Probably related to using ? as using direct data assignments worked in the unit test.

paulrutter commented 10 months ago

@jbrazeau i have been able to reproduce and confirmed that my PR is indeed causing the regression. I will let you know once i have a fix.

paulrutter commented 10 months ago

@jbrazeau see related PR which should fix it.

jbrazeau commented 10 months ago

Thank you very much for paying attention to that issue.

I've checked out the PR, built alasql and manually "patched" dist/alasql.fs.js in my node_modules folder (after having installed alasql@4.2.0). I confirm that the regression seems to disappears ! 👍

paulrutter commented 10 months ago

I would propose merging this and release as 4.2.1. We can check to re-add the cache layer for the Set later, now we have added more unit test coverage.

mathiasrw commented 10 months ago

Released as part of 4.2.1