gnodet commented on PR #27535: URL: https://github.com/apache/camel/pull/27535#issuecomment-6061843783
Thanks @davsclaus for the thorough review! All four concerns have been addressed in the two follow-up commits: 1. **`c.multiValue` / `c.exists` do not exist** — reverted to `std.map(function(x) x.field, collection)` for `.*field` selectors, and replaced `c.exists()` with `std.objectHas(obj, "key")` for `FieldAccess`/`AttributeAccess` (which is safe since Jsonnet evaluates the field reference first). Non-field shapes fall back to a TODO. 2. **String interpolation** — `$(expr)` is now emitted as a `/* TODO */` block comment (block, not line, so it's safe in sub-expression position) plus the literal string as a placeholder. The `%(expr)` approach has been dropped entirely. 3. **`$$` in reduce shorthand** — the parser now recognises `$$` as a `DoubleDollar` token in the lambda/shorthand path. The converter's `emitReduceShorthandBody()` rewrites `$$` → `acc` and `$` / `$.field` → `item` / `item.field`, emitting `std.foldl(function(acc, item) body, arr[1:], arr[0])` which matches DataWeave's first-element-as-initial-accumulator semantics. 4. **Existence check semantics** — already covered by point 1; `std.objectHas` correctly handles both `FieldAccess` and `AttributeAccess` shapes without Jsonnet raising an error on missing fields. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
