kukeiko / entity-space

MIT License
5 stars 1 forks source link

query merging behaviour in products example not working as expected #137

Closed kukeiko closed 2 years ago

kukeiko commented 2 years ago
  1. run products example
  2. query { price: [100, 200], rating: [3, 5] }
  3. query { price: [300, 500], rating: [3, 5] }

=> cached query is now { price: [300, 500], rating: [3, 5] }, when it should be ({ price: [100, 200], rating: [3, 5] } | { price: [300, 500], rating: [3, 5] })

kukeiko commented 2 years ago

whoops, found another example where merging is not working as expected: { price: [100, 200], rating: [3, 5] } merged with { price: [0, 300], rating: [0, 10] } should be { price: [0, 300], rating: [0, 10] }, but currently is ({ price: [100, 200], rating: [3, 5] } | { price: [0, 300], rating: [0, 10] })

kukeiko commented 2 years ago

found another case that is not working:

({ price: [100, 200], rating: [3, 5] } | { price: [100, 300], rating: [5, 7] }) merged with { price: [0, 1000], rating: [0, 8] } should be { price: [0, 1000], rating: [0, 8] } but currently is (({ price: [100, 200], rating: [3, 5] } | { price: [100, 300], rating: [5, 7] }) | { price: [0, 1000], rating: [0, 8] })