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 : ORDER BY after CREATE TABLE unsupported · Issue #2353 · JSQLParser/JSqlParser

[BUG] JSQLParser 5.4-SNAPSHOT : Clickhouse : ORDER BY after CREATE TABLE unsupported #2353

New issue
Copy link
New issue
Copy link
Closed
Feature
Closed
[BUG] JSQLParser 5.4-SNAPSHOT : Clickhouse : ORDER BY after CREATE TABLE unsupported#2353
Feature
Copy link

Description

@tomershay
tomershay
opened on Dec 12, 2025
Issue body actions

The parser doesn't support an ORDER BY statement after a CREATE TABLE, which is usually used to define the physical sort order of the table.

This capability is supported in latest Clickhouse.

Sample query:

CREATE TABLE metrics (
    event_date Date,
    user_id UInt64,
    value Float64
) ENGINE = MergeTree()
ORDER BY (event_date, user_id);

Error: ParseException: Encountered: <K_ORDER> / "ORDER", at line 6, column 1, in lexical

Activity

  1. manticore-projects
    added the
    Feature
    issue type on Jan 12, 2026
  2. fudianchn commented on Aug 17, 2026

    @fudianchn
    fudianchn
    on Aug 17, 2026
    Contributor
    More actions

    Verified on current master f41c0b8: the statement from this issue parses and round-trips.

    CCJSqlParserUtil.parse("CREATE TABLE metrics (\n"
            + " event_date Date,\n user_id UInt64,\n value Float64\n"
            + ") ENGINE = MergeTree()\n"
            + "ORDER BY (event_date, user_id)");
    // => parses, toString() round-trips

    The issue was reported against an older 5.4-SNAPSHOT; current master appears to have this fixed, so this can be closed.

  3. manticore-projects commented on Aug 17, 2026

    @manticore-projects
    manticore-projects
    on Aug 17, 2026
    Contributor
    More actions

    Thank you @fudianchn.

  4. minleejae commented on Sep 4, 2026

    @minleejae
    minleejae
    on Sep 4, 2026
    Contributor
    More actions

    @manticore-projects This was fixed by #2377, and the original SQL now parses and round-trips on the current master. Could you please close this issue?

    Reacted by manticore-projects
  5. manticore-projects
    closed this as completedon Sep 4, 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

    Feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — 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.