Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Verify PATH keyword already works as identifier via NonReserved list#2382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge3 commits intodevelop
base:develop
Choose a base branch
Loading
fromcopilot/limit-keyword-path-impact

Conversation

Copy link
Contributor

CopilotAI commentedDec 16, 2025
edited
Loading

The issue requested limiting the impact of the PATH keyword so it can be used as table/column names while remaining a keyword for graph search operations.

Investigation Results

PATH is already in theNonReserved list (line 3171 inalasqlparser.jison), which allows it to function as an identifier through the Literal rule's error recovery mechanism. This is the standard LR parser pattern for non-reserved keywords.

Changes

  • Added comprehensive test suite (test/test2222.js) covering:
    • PATH as table name, column name, and alias
    • PATH in WHERE, ORDER BY, GROUP BY, JOIN operations
    • PATH in graph SEARCH queries (original keyword usage)

Example Usage

// All of these work without issues:alasql('CREATE TABLE path (id INT, name STRING)');alasql('SELECT path FROM data WHERE path = "/home"');alasql('SELECT * FROM files ORDER BY path');// PATH still works as keyword in graph queries:alasql('SEARCH PATH(#Josephine) name FROM #Napoleon');

Conclusion

No grammar changes needed. The current implementation is optimal - PATH functions as a keyword in SearchSelector context while being usable as an identifier elsewhere. All 2109 tests pass.

Original prompt

This section details on the original issue you should resolve

<issue_title>Limit the impact of using the keyword: PATH</issue_title>
<issue_description>Limit the impact of using the keyword: PATH

Just like in#2203 we want to limit the impact of having keywords. Preferably by making them keywords only in the context needed so the string/word can be used for things like table names and column names i the data - if possible. It might be too much of a hassle to make the impact less, but lets investigate what is possible - still sticking to the SQL-99 specs.

Start by making a test file namedtest0000.js where 0000 is the issue ID of this ticket. Replicate the use and mimic what usecases could make sense to test, like as a table name, as a column name, as a graph search. Things lke that.

The grammar can be updated in alasqlgrammar.jison. Focus on small precise changes. After updating it we need to runyarn jison && yarn test

Always runyarn format before committing.

</issue_description>

Comments on the Issue (you are@copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn moreCopilot coding agent tips in the docs.

Co-authored-by: mathiasrw <1063454+mathiasrw@users.noreply.github.com>
CopilotAI changed the title[WIP] Update grammar to limit the impact of keyword PATHVerify PATH keyword already works as identifier via NonReserved listDec 16, 2025
CopilotAI requested a review frommathiasrwDecember 16, 2025 23:01
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please rename to test2222.js

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Renamed to test2222.js in commitf3583af

Co-authored-by: mathiasrw <1063454+mathiasrw@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mathiasrwmathiasrwAwaiting requested review from mathiasrw

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Limit the impact of using the keyword: PATH

2 participants

@mathiasrw

[8]ページ先頭

©2009-2025 Movatter.jp