Skip to content

[FORMATTING] Parse error when there are Column with Number Prefix #859

Closed
@duwanqiebi

Description

@duwanqiebi

Input data

Which SQL and options did you provide as input?

select 34_dffdfd from table_name

Expected Output

  select 34_dffdfd
     from table_name

Actual Output

An Unexpected Error Occurred
Parse error: Unexpected "34_dffdfd " at line 1 column 8. SQL dialect used: "spark".

Please report this at [Github issues page.](https://github.com/sql-formatter-org/sql-formatter/issues)

Stack Trace:

Error: Parse error: Unexpected "34_dffdfd " at line 1 column 8.
SQL dialect used: "spark".
    at T.default.createParseError (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:233790)
    at T.default.tokenize (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:233556)
    at T.default.tokenize (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:228858)
    at T.default.tokenize (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:243624)
    at T.default.reset (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:242151)
    at T.O.feed (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:268202)
    at Object.parse (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:243762)
    at T.default.parse (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:16428)
    at T.default.format (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:16326)
    at T.formatDialect (https://unpkg.com/sql-formatter@latest/dist/sql-formatter.min.js:1:26

Usage

  • How are you calling / using the library? yes
  • What SQL language(s) does this apply to? Spark
  • Which SQL Formatter version are you using? 15.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions