FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat:support clickhouse global keyword in IN Expression by herbert2008 · Pull Request #1794 · JSQLParser/JSqlParser · GitHub

feat:support clickhouse global keyword in IN Expression - #1794

Merged
manticore-projects merged 1 commit into
JSQLParser:masterfrom
herbert2008:clickhouse_global_in
Sep 12, 2023
Merged

feat:support clickhouse global keyword in IN Expression#1794
manticore-projects merged 1 commit into
JSQLParser:masterfrom
herbert2008:clickhouse_global_in

Conversation

Copy link
Copy Markdown
Contributor
  • Add support for clickhouse global keyword in IN Expression

  • example:

SELECT lo_linenumber,lo_orderkey from lo_linenumber where lo_linenumber global in (1,2,3)

Add support for clickhouse global keyword in IN Expression
example:
SELECT lo_linenumber,lo_orderkey from lo_linenumber where lo_linenumber global in (1,2,3)

Copy link
Copy Markdown
Contributor

Please sync against latest development branch and resolve conflicts.
Thank you.

Copy link
Copy Markdown
Contributor

Any feedback please? I would like top close this otherwise.

wjxfhxy commented Sep 11, 2023

Copy link
Copy Markdown

Have this feature been merged into version 4. 7? Or is it planned to be added in which version?

manticore-projects merged commit ced0d00 into JSQLParser:master Sep 12, 2023

Copy link
Copy Markdown
Contributor

wjxfhxy commented Sep 13, 2023

Copy link
Copy Markdown

SELECT datetime FROM tableA where anonymousid global in ( select distinct anonymousid from tableB)

I use this SQL to do testing and no error is reported

Copy link
Copy Markdown
Contributor

Greetings.

Your statement parses without any problem and you can try it online here.

Although you will need to take the latest JSQLParser Snapshot from http://manticore-projects.com/download/jsqlparser-4.7/JSQLParser-4.8-SNAPSHOT.jar

tmortagne commented Aug 6, 2026
edited
Loading

Copy link
Copy Markdown

Note that this caused a regression: "global" is apparently matched everywhere, and it makes parsing things like select global.XWS_NAME from xwikistrings as global not possible anymore (ParseException: Encountered unexpected token: "as" "AS" at line 1, column 42).

It seems to be fixed by #2385 (and it indeed works fine in the online tool), but it's not released yet, and https://github.com/JSQLParser/JSqlParser/blob/master/src/site/sphinx/keywords.rst still lists "GLOBAL" as reserved, so I'm wondering if it was really on purpose. If perfectly valid queries like select global.XWS_NAME from xwikistrings as global are officially not supported anymore, it's going to be a blocker for us to upgrade...

manticore-projects commented Aug 7, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

@tmortagne: Your example works.

You can use the manticore artifacts:

<dependency>
    <groupId>com.manticore-projects.jsqlformatter</groupId>
    <artifactId>jsqlparser</artifactId>
    <version>[5.3.218,)</version>
</dependency>

GLOBAL is still a reserved keyword in the sense, that it will need to get quoted when using it as an identifier (at certain places).

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL