Title: [BUG] Chaining .? (optional select) produces nested Optional(Optional(...)) · Issue #1083 · cel-expr/cel-java · GitHub
Open Graph Title: [BUG] Chaining .? (optional select) produces nested Optional(Optional(...)) · Issue #1083 · cel-expr/cel-java
X Title: [BUG] Chaining .? (optional select) produces nested Optional(Optional(...)) · Issue #1083 · cel-expr/cel-java
Description: Describe the bug Chaining multiple .? (optional field select) operations does not work correctly. Each .? in the chain wraps the result in an additional Optional, producing Optional(Optional(Optional(...))) instead of a flat Optional. Fo...
Open Graph Description: Describe the bug Chaining multiple .? (optional field select) operations does not work correctly. Each .? in the chain wraps the result in an additional Optional, producing Optional(Optional(Option...
X Description: Describe the bug Chaining multiple .? (optional field select) operations does not work correctly. Each .? in the chain wraps the result in an additional Optional, producing Optional(Optional(Option...
Opengraph URL: https://github.com/cel-expr/cel-java/issues/1083
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Chaining .? (optional select) produces nested Optional(Optional(...))","articleBody":"**Describe the bug**\nChaining multiple .? (optional field select) operations does not work correctly. Each .? in the chain wraps the result in an additional Optional, producing Optional(Optional(Optional(...))) instead of a flat Optional\u003cT\u003e.\n\nFor example:\n\n```cel\na.?b.?c.?d.orValue(\"default\")\n```\n\nfails at runtime, while the equivalent [?] index syntax works fine:\n\n```cel\na[?\"b\"][?\"c\"][?\"d\"].orValue(\"default\")\n```\n\n**cel-go seems to handle this correctly**: The Go reference implementation unwraps an optional operand before applying qualifiers: https://github.com/google/cel-go/blob/master/interpreter/attributes.go#L1298\n\n**To Reproduce**\nCheck which components this affects:\n\n- [ ] parser\n- [ ] checker\n- [X] runtime\n\nSample expression and input that reproduces the issue:\n```cel\na.?b.?c.?d.orValue(\"default\")\n```\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n`a.?b.?c.?d.orValue(\"default\")` should behave the same way as `a[?\"b\"][?\"c\"][?\"d\"].orValue(\"default\")`, not throw. \n","author":{"url":"https://github.com/LouisCaubet","@type":"Person","name":"LouisCaubet"},"datePublished":"2026-06-11T03:16:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1083/cel-java/issues/1083"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:57a71215-a9d3-3f33-9c83-39fa4b8410db |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C13E:381E5:29301:38123:6A5057A9 |
| html-safe-nonce | 5a0f50eaadde04bdb972b6617ff8d99c9517beb63ebb44eef55f8e5801708c18 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTNFOjM4MUU1OjI5MzAxOjM4MTIzOjZBNTA1N0E5IiwidmlzaXRvcl9pZCI6IjIyMTI4MzYwNzQwMjMwNDkxMjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 918d554159db81bd218ad03ff1f477813db42d18b5a8cbf8b162810e05e392be |
| hovercard-subject-tag | issue:4636895684 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cel-expr/cel-java/1083/issue_layout |
| twitter:image | https://opengraph.githubassets.com/91cce6120fba47a951f5fc2284cad3b66628475d50acf9e7cfc4a4b576789541/cel-expr/cel-java/issues/1083 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/91cce6120fba47a951f5fc2284cad3b66628475d50acf9e7cfc4a4b576789541/cel-expr/cel-java/issues/1083 |
| og:image:alt | Describe the bug Chaining multiple .? (optional field select) operations does not work correctly. Each .? in the chain wraps the result in an additional Optional, producing Optional(Optional(Option... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LouisCaubet |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/cel-expr/cel-java git https://github.com/cel-expr/cel-java.git |
| octolytics-dimension-user_id | 186625994 |
| octolytics-dimension-user_login | cel-expr |
| octolytics-dimension-repository_id | 587078119 |
| octolytics-dimension-repository_nwo | cel-expr/cel-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 587078119 |
| octolytics-dimension-repository_network_root_nwo | cel-expr/cel-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width