Skip to content

Alias 'at' not allowed #1414

@Bartman0

Description

@Bartman0

Describe the bug
An alias named 'at' is not allowed for a table in a (select-)query.

To Reproduce
@test
public void testAliasAt() throws JSQLParserException {
String sql = "SELECT * FROM table1 at";
Statement stmt = CCJSqlParserUtil.parse(sql);
TablesNamesFinder tablesNamesFinder = new TablesNamesFinder();
List tableList = tablesNamesFinder.getTableList(stmt);
assertEquals(1, tableList.size());
assertTrue(tableList.contains("table1"));
}

Expected behavior
I would expect that 'at' would be allowed as an alias name.
workaround is to put 'at' between quotes, but I do not see why this would be necessary.

System

  • Java Version 11
  • JSqlParser version 4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions