GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [BUG] JSQLParser 5.4-SNAPSHOT : ClickHouse : C-style ternary operator (? :) not supported in SELECT · Issue #2436 · JSQLParser/JSqlParser

[BUG] JSQLParser 5.4-SNAPSHOT : ClickHouse : C-style ternary operator (? :) not supported in SELECT #2436

New issue
Copy link
New issue
Copy link
Closed
Closed
[BUG] JSQLParser 5.4-SNAPSHOT : ClickHouse : C-style ternary operator (? :) not supported in SELECT#2436
Copy link

Description

@tomershay
tomershay
opened on Jun 14, 2026
Issue body actions

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 fails to parse this operator when used as a select item.

See the ClickHouse docs:
https://clickhouse.com/docs/en/sql-reference/functions/conditional-functions

SQL Example

CREATE TABLE t (x Int32) ENGINE = MergeTree ORDER BY x;

INSERT INTO t VALUES (1);

SELECT x > 0 ? 'y' : 'n' FROM t;

Parsing error

ParseException: Encountered: "?" / "?", at line 1, column 14, in lexical state DEFAULT.

Activity

  1. fudianchn
    added a commit that references this issue on Aug 14, 2026

    fix: support ClickHouse C-style ternary operator (? :) in expressions (…

    9d0e057
  2. manticore-projects
    added a commit that references this issue on Aug 14, 2026

    fix: support ClickHouse C-style ternary operator (? :) in expressions (…

    60b0875
  3. manticore-projects
    closed this as completedon Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.