René's URL Explorer Experiment


Title: fix: allow GROUPS as identifier by making it a non-reserved keyword (#2473) by fudianchn · Pull Request #2474 · JSQLParser/JSqlParser · GitHub

Open Graph Title: fix: allow GROUPS as identifier by making it a non-reserved keyword (#2473) by fudianchn · Pull Request #2474 · JSQLParser/JSqlParser

X Title: fix: allow GROUPS as identifier by making it a non-reserved keyword (#2473) by fudianchn · Pull Request #2474 · JSQLParser/JSqlParser

Description: What GROUPS becomes a non-reserved keyword again, so it can be used as an identifier (column, table, alias) while the GROUPS window frame unit keeps working: SELECT groups FROM mytable SELECT * FROM groups CREATE TABLE mytable (groups INT) Why / Root cause #2460 (commit d92f407) introduced the PostgreSQL GROUPS frame unit and declared in the reserved keyword token section. In PostgreSQL, GROUPS is a non-reserved keyword and stays a legal identifier, so statements like the ones above parsed before #2460 and fail on master with Encountered unexpected token: "groups". The decision in #2460 Making GROUPS reserved was a deliberate, reviewed trade-off, not an oversight. #2460 initially declared K_GROUPS inside NonReservedWord() (24cf1bd); during review the raw productions (CREATE SCHEMA, SET PATH, Oracle KEEP, interval type, COLLATE, the ColDataType lookahead) were called out, and the token was then moved to the reserved set instead of broadening those productions. One point that was not on the table then: the sibling frame units already live in exactly the state this PR restores for GROUPS. ROWS and RANGE are non-reserved on master, and the same raw-identifier productions reject them identically: CREATE SCHEMA rows -- fails on master CREATE SCHEMA range -- fails on master SELECT a COLLATE rows FROM t -- fails on master while quoted forms (CREATE SCHEMA "groups") work everywhere. "Non-reserved, raw-identifier positions need quoting" is therefore the existing status quo for frame-unit keywords in this grammar, and this PR makes GROUPS consistent with ROWS and RANGE (all three are non-reserved in PostgreSQL) rather than introducing a new inconsistency. If keeping GROUPS reserved is preferred, closing this PR is fine. If the raw-identifier productions should accept the frame-unit words, that would be a separate change applying to ROWS, RANGE and GROUPS alike; I can prepare it on request. How One symmetric relocation in JSqlParserCC.jjt: the declaration moves from the reserved token section into the NonReservedWord() production (between GRANT and GROUP_CONCAT). Tokens declared inside NonReservedWord() fall into the MIN_NON_RESERVED_WORD … MAX_NON_RESERVED_WORD kind range, which RelObjectName() and isAliasAhead() already accept, and which KeywordsTest covers parameterized as identifiers. No other grammar rule changes, and the explicit match in WindowElement() is unaffected (only the token kind numbering moves). Scope Only the keyword classification changes. GROUPS frame units (ROWS / RANGE / GROUPS BETWEEN ... EXCLUDE ...) keep parsing exactly as before; GROUPS additionally works in every identifier position covered by the non-reserved range guards (column, table, schema, alias, function name). Testing KeywordsTest.testGroupsAsIdentifier reproduces the issue (column, table, explicit and implicit alias, CREATE TABLE column definition): fails on master with JSQLParserException, passes with this change. The parameterized KeywordsTest identifier cases pick GROUPS up automatically (732 -> 734 tests). Performance gradle jmh, JSQLParserBenchmark.parseSQLStatements on performance.sql, version=latest, 10 forks x 10 iterations (100 samples) on a 32-core host: build ms/op master (406a4d4) 3.712 ± 0.020 this PR (37b6068) 3.709 ± 0.022 The -0.08% delta lies within the 99.9% confidence intervals (the CIs overlap almost entirely): no regression. Verification of the original issue All statements from #2473 fail on master and parse + round-trip with this change. Fixes #2473

Open Graph Description: What GROUPS becomes a non-reserved keyword again, so it can be used as an identifier (column, table, alias) while the GROUPS window frame unit keeps working: SELECT groups FROM mytable SELECT * FRO...

X Description: What GROUPS becomes a non-reserved keyword again, so it can be used as an identifier (column, table, alias) while the GROUPS window frame unit keeps working: SELECT groups FROM mytable SELECT * FRO...

Opengraph URL: https://github.com/JSQLParser/JSqlParser/pull/2474

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:801c9700-7e9f-fc1f-8d13-9591232ebe7a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id84B2:2130A1:198173:235D27:6B049288
html-safe-noncef418c2751e20330acb0cdfd602fa9105b0faa6a017002dfb2a2c8d762b2dc5e8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEIyOjIxMzBBMToxOTgxNzM6MjM1RDI3OjZCMDQ5Mjg4IiwidmlzaXRvcl9pZCI6Ijc4MDUyOTY2OTUwNTA1Mzk2NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbae67759c26be6bd286c438234fc4cccdf6bd2d54dff296a1acbfae3df4f9644
hovercard-subject-tagpull_request:4286130751
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/JSQLParser/JSqlParser/pull/2474/files
twitter:imagehttps://avatars.githubusercontent.com/u/40510713?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40510713?s=400&v=4
og:image:altWhat GROUPS becomes a non-reserved keyword again, so it can be used as an identifier (column, table, alias) while the GROUPS window frame unit keeps working: SELECT groups FROM mytable SELECT * FRO...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9b297275a74a2c9a35898175c9477837c635d4f579277ebff3b2d6ebd012e247
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/JSQLParser/JSqlParser git https://github.com/JSQLParser/JSqlParser.git
octolytics-dimension-user_id4643847
octolytics-dimension-user_loginJSQLParser
octolytics-dimension-repository_id1944709
octolytics-dimension-repository_nwoJSQLParser/JSqlParser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1944709
octolytics-dimension-repository_network_root_nwoJSQLParser/JSqlParser
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb51ce57ca6d4565a42856fc1c9897077c794597f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/JSQLParser/JSqlParser/pull/2474/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fpull%2F2474%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fpull%2F2474%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=JSQLParser%2FJSqlParser
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2474/files
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2474/files
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2474/files
JSQLParserhttps://github.com/JSQLParser
JSqlParserhttps://github.com/JSQLParser/JSqlParser
Codehttps://github.com/JSQLParser/JSqlParser
Issues2 (2)https://github.com/JSQLParser/JSqlParser/issues
Pull requests2 (2)https://github.com/JSQLParser/JSqlParser/pulls
Discussionshttps://github.com/JSQLParser/JSqlParser/discussions
Actionshttps://github.com/JSQLParser/JSqlParser/actions
Projectshttps://github.com/JSQLParser/JSqlParser/projects
Wikihttps://github.com/JSQLParser/JSqlParser/wiki
Security and qualityhttps://github.com/JSQLParser/JSqlParser/security
Insightshttps://github.com/JSQLParser/JSqlParser/insights
Sign up for GitHub https://github.com/signup?return_to=%2FJSQLParser%2FJSqlParser%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FJSQLParser%2FJSqlParser%2Fissues%2Fnew%2Fchoose
manticore-projectshttps://github.com/manticore-projects
JSQLParser:masterhttps://github.com/JSQLParser/JSqlParser/tree/master
fudianchn:fix/groups-nonreserved-2473https://github.com/fudianchn/JSqlParser/tree/fix/groups-nonreserved-2473
Conversation 1 https://github.com/JSQLParser/JSqlParser/pull/2474
Commits 1 https://github.com/JSQLParser/JSqlParser/pull/2474/commits
Checks 7 https://github.com/JSQLParser/JSqlParser/pull/2474/checks
Files changed https://github.com/JSQLParser/JSqlParser/pull/2474/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2474/files
fix: allow GROUPS as identifier by making it a non-reserved keyword (#2473) https://github.com/JSQLParser/JSqlParser/pull/2474/files#top
Show all changes 1 commit https://github.com/JSQLParser/JSqlParser/pull/2474/files
37b6068 fix: allow GROUPS as identifier by making it a non-reserved keyword (… fudianchn Aug 15, 2026 https://github.com/JSQLParser/JSqlParser/pull/2474/commits/37b6068ca198d607f3947a71f132f27d6a721e96
Clear filters https://github.com/JSQLParser/JSqlParser/pull/2474/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2474/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2474/files
JSqlParserCC.jjt https://github.com/JSQLParser/JSqlParser/pull/2474/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
KeywordsTest.java https://github.com/JSQLParser/JSqlParser/pull/2474/files#diff-c05162cd0932c6170f1975806e20dc280019ba0f96d26a56b313b4d237509b17
src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjthttps://github.com/JSQLParser/JSqlParser/pull/2474/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
View file https://github.com/fudianchn/JSqlParser/blob/37b6068ca198d607f3947a71f132f27d6a721e96/src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/JSQLParser/JSqlParser/pull/2474/{{ revealButtonHref }}
https://github.com/JSQLParser/JSqlParser/pull/2474/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
https://github.com/JSQLParser/JSqlParser/pull/2474/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
https://github.com/JSQLParser/JSqlParser/pull/2474/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
https://github.com/JSQLParser/JSqlParser/pull/2474/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
src/test/java/net/sf/jsqlparser/statement/KeywordsTest.javahttps://github.com/JSQLParser/JSqlParser/pull/2474/files#diff-c05162cd0932c6170f1975806e20dc280019ba0f96d26a56b313b4d237509b17
View file https://github.com/fudianchn/JSqlParser/blob/37b6068ca198d607f3947a71f132f27d6a721e96/src/test/java/net/sf/jsqlparser/statement/KeywordsTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/JSQLParser/JSqlParser/pull/2474/{{ revealButtonHref }}
https://github.com/JSQLParser/JSqlParser/pull/2474/files#diff-c05162cd0932c6170f1975806e20dc280019ba0f96d26a56b313b4d237509b17
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2474/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.