fix: handle filter projections with array field access#67
fix: handle filter projections with array field access#67
Conversation
Fixes issue where expressions like [?stack==''].branch[?starts_with(@, 'one')] would fail with invalid-type error. The FilterProjection interpreter now correctly handles array-of-arrays by applying filters to sub-elements while maintaining projection structure. Fixes #23 <!-- ps-id: 01fb2a2e-8823-477c-b9d2-1dadc433b26a -->
85798be to
45115b7
Compare
|
I think this is controversial 😏 I spent ages trying to figure out which one is right. It turns out that this is in fact not a bug, even though the result is not intuitive. Source: from the Python mother-of-all implementations : # Everything above stops a projection.
'star': 20,
'filter': 21,I also think that the language design that led to this difference is unfortunate and should definitely be addressed. |
Potential workaround / design decision that should be documented? Flatten operator |
Fixes issue where expressions like
[?stack==''].branch[?starts_with(@, 'one')]would fail with invalid-type error.The FilterProjection interpreter now correctly handles array-of-arrays by applying filters to sub-elements while maintaining projection structure.
Fixes #23