cognitect-labs / vase

Data driven microservices
Eclipse Public License 1.0
373 stars 42 forks source link

Behavior of :find [(pull ... is under-defined and has changed recently #71

Open deg opened 7 years ago

deg commented 7 years ago

The behavior of a Vase pull query does not seem to be fully defined. Worse, it has recently changed incompatibly somewhere between Vase commits 8f61d36 and bf96190.

In the old version :find [(pull ?e [*]) ...] returned the tuples wrapped in an extra layer of vector. This extra wrapping no longer occurs. FWIW, the new behavior seems more sensible, but the change breaks client code.

Also, surprising at least to me, a simpler :find (pull ?e [*]) returned a more complex structure. Prior to the recent changes, if I recall correctly, there were two extra layers. I've not tested what is returned in the latest version.

Suggestions: 1) Document the interactions between pull and Vase, and the expected values. Some additional tests would be good too. The code is likely fragile, given that the current change appears to have been introduced accidentally. 2) Warn that the behavior has changed, in the 0.9.1 release notes