Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
21.78k stars 1.49k forks source link

Nested data providers return no results when multiple filters are applied to them. #13505

Open ConorWebb96 opened 4 months ago

ConorWebb96 commented 4 months ago

Checklist

Hosting

Describe the bug Nested filtered data providers return no results even though their filtering logic seem to be correct. This only happens when more than 1 filter is added to the nested data provider. At the top level data provider no issues seem to occur.

To Reproduce Steps to reproduce the behavior:

  1. Import the attached app below
  2. Go to the home screen
  3. Look at the filters and see that it should return 2 records.
  4. See error

Expected behavior 6 records should be shown whenever referencing the nested data provider.

Screenshots Main filter nothing is set returns all rows within a table.

Screenshot 2024-04-17 at 09 51 59

Nested filter 2 filters are set nothing is returned even though every row within main provider is either value a or b.

Screenshot 2024-04-17 at 09 52 11

App Export test nested-export-1713343985090.tar.gz

linear[bot] commented 4 months ago

BUDI-8178 Nested data providers return no results when multiple filters are applied to them.

aptkingston commented 4 months ago

The issue with this one is that applying filters to a data provider which is using another data provider as its source, will only do fake in-memory filtering. Looking at the code, right now that code does not fully support the "match any" constraint. It will properly check if any operator passes, but for each operator is does a "match all" on all the values.

i.e. this fails because it is 2 filters using the same "equal" operator.

This is a bug in the code so can be fixed. However I would still discourage this setup because it's doing in-memory filtering rather than server-side filtering.