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 — feat:support clickhouse global keyword in IN Expression by herbert2008 · Pull Request #1794 · JSQLParser/JSqlParser

Conversation

@herbert2008

@herbert2008 herbert2008 commented May 24, 2023

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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@herbert2008
feat:support clickhouse global keyword in IN Expression
a9ed798
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)
@manticore-projects

manticore-projects commented Jul 12, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@manticore-projects

manticore-projects commented Jul 18, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@wjxfhxy

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

manticore-projects commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

You can test it online here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@wjxfhxy

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@manticore-projects

manticore-projects commented Sep 13, 2023

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tmortagne

tmortagne commented Aug 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@manticore-projects

manticore-projects commented Aug 7, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@herbert2008 @manticore-projects @wjxfhxy @tmortagne
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.