engie-group / shaystack

Simplifying Implementation of Haystack
BSD 2-Clause "Simplified" License
23 stars 8 forks source link

Filter don't work with ==0 #8

Closed tuscaonline closed 1 year ago

tuscaonline commented 1 year ago

Describe the bug when i use g.filter('floorNum==0') I expect some result but i get 0 row

To Reproduce Use the code below to generate the grids `g = shaystack.parse( """id:@muz dis:Musée de la Nouvelle Calédonie area: 4439m² site geoCity: Nouméa geoPostalCode: 98800 geoCountry: NC tz: Noumea primaryFunction: Museum yearBuilt: 2022

id: @muz.A.rdc dis: Rez de chaussée bâtiment A space
floor floorNum: 0 siteRef: @muz

id: @muz.B.rdc dis: Rez de chaussée bâtiment B space
floor floorNum: 1 siteRef: @muz"""
, mode=shaystack.MODE_TRIO)` g.filter('floorNum==0')

Expected behavior When i use g.filter('floorNum==1') I got one Row as i expect but when i use g.filter('floorNum==0' I got 0 row or i expect 1 row

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Amine-OMRI commented 1 year ago

Hello @tuscaonline, thanks for reporting the problem and we have started working on it, it seems that it is a bug when filtering on rows with an element equal to zero. the filter works with the other numbers works correctly, it cannot find the rows that have 0 as a value of a specefic element. A fix will be made to avoid this problem and we will let you know when it is fixed.

Amine-OMRI commented 1 year ago

Hello @tuscaonline, the correction has been made, you can try again, it should be resolved. Thanks for reporting the bug and let us know if you still have problems.