taozhi8833998 / taozhi8833998/node-sql-parser

feature: error on table reopen with same alias

Open
#2,371 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PEG.js
Stars
1k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

i would expect:

select * from table1
inner join table2
left join table1 on table1.id = table2.table1_id

to throw since the table opening is incorrect -> you can't open multiple tables to the same aliased name.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the SQL example through node-sql-parser's parser entry point and trace how joined table aliases are handled. Add coverage for reopening a table with the same alias and confirm that it raises an error while valid table aliases remain accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.