Title: [BUG] JSQLParser 5.4-SNAPSHOT : ClickHouse : C-style ternary operator (? :) not supported in SELECT · Issue #2436 · JSQLParser/JSqlParser · GitHub
Open Graph Title: [BUG] JSQLParser 5.4-SNAPSHOT : ClickHouse : C-style ternary operator (? :) not supported in SELECT · Issue #2436 · JSQLParser/JSqlParser
X Title: [BUG] JSQLParser 5.4-SNAPSHOT : ClickHouse : C-style ternary operator (? :) not supported in SELECT · Issue #2436 · JSQLParser/JSqlParser
Description: Failing SQL Feature ClickHouse supports the C-style ternary conditional operator cond ? then : else as an alias for the if(cond, then, else) function. For example, x > 0 ? 'y' : 'n' returns 'y' when x > 0 and 'n' otherwise. JSQLParser fa...
Open Graph Description: Failing SQL Feature ClickHouse supports the C-style ternary conditional operator cond ? then : else as an alias for the if(cond, then, else) function. For example, x > 0 ? 'y' : 'n' returns 'y' whe...
X Description: Failing SQL Feature ClickHouse supports the C-style ternary conditional operator cond ? then : else as an alias for the if(cond, then, else) function. For example, x > 0 ? 'y' : 'n...
Opengraph URL: https://github.com/JSQLParser/JSqlParser/issues/2436
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] JSQLParser 5.4-SNAPSHOT : ClickHouse : C-style ternary operator (? :) not supported in SELECT","articleBody":" **Failing SQL Feature**\n\nClickHouse supports the C-style ternary conditional operator `cond ? then : else` as an alias for the `if(cond, then, else)` function. For example, `x \u003e 0 ? 'y' : 'n'` returns `'y'` when `x \u003e 0` and `'n'` otherwise. JSQLParser fails to parse this operator when used as a select item.\n\n See the ClickHouse docs:\n https://clickhouse.com/docs/en/sql-reference/functions/conditional-functions\n\n **SQL Example**\n\n ```sql\n CREATE TABLE t (x Int32) ENGINE = MergeTree ORDER BY x;\n\n INSERT INTO t VALUES (1);\n\n SELECT x \u003e 0 ? 'y' : 'n' FROM t;\n```\n Parsing error\n\n`ParseException: Encountered: \"?\" / \"?\", at line 1, column 14, in lexical state DEFAULT.`\n","author":{"url":"https://github.com/tomershay","@type":"Person","name":"tomershay"},"datePublished":"2026-06-14T20:21:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2436/JSqlParser/issues/2436"}
| 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:cefb8a73-79f8-05b8-d7d6-9a76db01e74e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD74:129517:568C0F:73DC51:6A629BD5 |
| html-safe-nonce | 02c6d8197ca949645eb768575ab9048c3176089a381670e34ba874c1699eb360 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDc0OjEyOTUxNzo1NjhDMEY6NzNEQzUxOjZBNjI5QkQ1IiwidmlzaXRvcl9pZCI6IjU5MjU3NzU1OTI3ODA4OTcyMzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ea935e18206d9d486c9b09bfa71ac7f76d4610a2be0cddfea8ec1e921e0ff49e |
| hovercard-subject-tag | issue:4660483725 |
| 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/JSQLParser/JSqlParser/2436/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ac7879a42302731ecb75082693cadef974d0705e5f1bea06724c88026032427/JSQLParser/JSqlParser/issues/2436 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ac7879a42302731ecb75082693cadef974d0705e5f1bea06724c88026032427/JSQLParser/JSqlParser/issues/2436 |
| og:image:alt | Failing SQL Feature ClickHouse supports the C-style ternary conditional operator cond ? then : else as an alias for the if(cond, then, else) function. For example, x > 0 ? 'y' : 'n' returns 'y' whe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tomershay |
| hostname | github.com |
| expected-hostname | github.com |
| None | a6443033349a18134b517627f043d4a59a5110337b879810c7229c2c7e28eda0 |
| turbo-cache-control | no-preview |
| go-import | github.com/JSQLParser/JSqlParser git https://github.com/JSQLParser/JSqlParser.git |
| octolytics-dimension-user_id | 4643847 |
| octolytics-dimension-user_login | JSQLParser |
| octolytics-dimension-repository_id | 1944709 |
| octolytics-dimension-repository_nwo | JSQLParser/JSqlParser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1944709 |
| octolytics-dimension-repository_network_root_nwo | JSQLParser/JSqlParser |
| 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 | d6c6cacbe32d3ddfd1796fbd1a39b8fb47b87daf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width