GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unexpected token: apply · Issue #1148 · JSQLParser/JSqlParser

Unexpected token: apply #1148

New issue
Copy link
New issue
Copy link
Closed
#1382
Closed
Unexpected token: apply#1148
#1382
Copy link

Description

@Fioooooooo
Fioooooooo
opened on Apr 7, 2021
Issue body actions

Describe the bug
There is a sql which i can run with mysql success, but if with jsqlparser, got an exception

To Reproduce
Steps to reproduce the behavior:

  1. Example SQL
 SELECT  remark,apply FROM oms_data
  1. Exception Log
2021-04-07 09:55:02.471  WARN 41488 --- [nio-8080-exec-1] c.b.m.e.p.i.PaginationInnerInterceptor   : optimize this sql to a count sql has exception, sql:"SELECT  
remark,apply
  FROM oms_data", exception:
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "apply" "APPLY"
    at line 2, column 8.

Was expecting one of:

    "!"
    "("
    "*"
    "+"
    "-"
    ":"
    "?"
    "@"
    "@@"
    "ACTION"
    "ANY"
    "BYTE"
    "CASCADE"
    "CASE"
    "CAST"
    "CHANGE"
    "CHAR"
    "CHARACTER"
    "COLUMN"
    "COLUMNS"
    "COMMENT"
    "COMMIT"
    "CREATE"
    "CURRENT"
    "CYCLE"
    "DESCRIBE"
    "DISABLE"
    "DO"
    "DOUBLE"
    "DUPLICATE"
    "ENABLE"
    "END"
    "EXTRACT"
    "FALSE"
    "FIRST"
    "FN"
    "FOLLOWING"
    "GROUP"
    "GROUP_CONCAT"
    "IF"
    "IIF"
    "INDEX"
    "INSERT"
    "INTERVAL"
    "ISNULL"
    "KEY"
    "LAST"
    "LEFT"
    "LIMIT"
    "MATCH"
    "MATERIALIZED"
    "NEXTVAL"
    "NO"
    "NOLOCK"
    "NOT"
    "NULL"
    "NULLS"
    "OFFSET"
    "ON"
    "OPEN"
    "OPTIMIZE"
    "ORDER"
    "OVER"
    "PARTITION"
    "PATH"
    "PERCENT"
    "PRECISION"
    "PRIMARY"
    "PRIOR"
    "PROCEDURE"
    "RANGE"
    "READ"
    "REPLACE"
    "RIGHT"
    "ROW"
    "ROWS"
    "SCHEMA"
    "SEPARATOR"
    "SESSION"
    "SET"
    "SIBLINGS"
    "SIZE"
    "START"
    "TABLE"
    "TEMP"
    "TEMPORARY"
    "TOP"
    "TRUE"
    "TRUNCATE"
    "TYPE"
    "UNSIGNED"
    "VALIDATE"
    "VALUE"
    "VALUES"
    "VIEW"
    "XML"
    "ZONE"
    "{"
    "{d"
    "{t"
    "{ts"
    "~"
    <K_DATETIMELITERAL>
    <K_DATE_LITERAL>
    <K_TIME_KEY_EXPR>
    <S_CHAR_LITERAL>
    <S_DOUBLE>
    <S_HEX>
    <S_IDENTIFIER>
    <S_LONG>
    <S_QUOTED_IDENTIFIER>

Expected behavior
A clear and concise description of what you expected to happen.

System

  • Database you are using: MySQL 5.6.16
  • Java Version: Oracle 1.8.0_251
  • JSqlParser version: 3.2

Activity

  1. Fioooooooo commented on Apr 7, 2021

    @Fioooooooo
    Fioooooooo
    on Apr 7, 2021
    Author
    More actions

    There is also has the exception when i update JSqlParser vertion to 4.0

  2. wumpz commented on Apr 10, 2021

    @wumpz
    wumpz
    on Apr 10, 2021
    Member
    More actions

    apply is a keyword. I checked to adapt the grammar to allow apply as a column name. Unfortunately this is not trivial.

  3. manticore-projects commented on Oct 19, 2021

    @manticore-projects
    manticore-projects
    on Oct 19, 2021
    Contributor
    More actions

    Fixed by PR #1382

    You can test it online and interactively here.

  4. wumpz
    closed this as completedin #1382on Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.