code-kern-ai / refinery

The data scientist's open-source choice to scale, assess and maintain natural language data. Treat training data like a software artifact.
https://www.kern.ai
Apache License 2.0
1.39k stars 66 forks source link

[BUG] - Filtering on data browser when an integer attribute is equal to 0 does not work #204

Closed lumburovskalina closed 1 year ago

lumburovskalina commented 1 year ago

Describe the bug Filtering on data browser with an integer attribute equal to 0 does not work. If the users choses an integer attribute from the dropdown menu and uses any operator except for IN and IN_WC and sets the search text to 0 , the filtering results are wrong because all records are returned. If the user choses any other search text or non integer attribute, this wouldn't be the case.

To Reproduce Steps to reproduce the behavior:

  1. Go to data-browser.
  2. Select integer attribute(ex. running_id), operator EQUAL and type 0 into the search text.
  3. The filtering gives wrong results.

Expected behavior The expected behaviour is that the user gets the right data (ex. if he searches for attribute EQUAL to zero, he should get only 0 result and not all records). This should work for all operators, different data types and different search text.

Screenshots

Screenshot 2023-01-11 at 16 22 38

Desktop (please complete the following information):