Skip to content

[Bug]: hivesql 校验错误 #362

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lipengpeng288 opened this issue Nov 7, 2024 · 3 comments
Closed

[Bug]: hivesql 校验错误 #362

lipengpeng288 opened this issue Nov 7, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@lipengpeng288
Copy link

Version

v4.0.2

Which SQL?

Hive

SQL content

set hiveVar:A=1

JavaScript/TypeScript code

No response

What happened?

语法校验错误: mismatched input ':' expecting {'.',EQUAL}
期待:校验通过

Relevant log output

No response

@liuxy0551 liuxy0551 self-assigned this Nov 7, 2024
@liuxy0551 liuxy0551 added the bug Something isn't working label Nov 8, 2024
@liuxy0551
Copy link
Collaborator

liuxy0551 commented Nov 14, 2024

使用以下 sql 验证效果:

SET hivevar:A = 1;
SELECT ${A};
SELECT ${hivevar:A};

liuxy0551 added a commit to liuxy0551/dt-sql-parser that referenced this issue Nov 14, 2024
mumiao pushed a commit that referenced this issue Nov 14, 2024
@mumiao
Copy link
Collaborator

mumiao commented Nov 14, 2024

done with c232aaa

@mumiao mumiao closed this as completed Nov 14, 2024
liuxy0551 added a commit to liuxy0551/dt-sql-parser that referenced this issue Nov 14, 2024
liuxy0551 added a commit that referenced this issue Nov 14, 2024
@liuxy0551
Copy link
Collaborator

The issue has been resolved in dt-sql-parser@4.1.0-beta.3.

mumiao added a commit that referenced this issue Feb 13, 2025
* feat: improve errorListener msg (#281)

* feat: add mysql errorListener and commonErrorListener

* feat: improve other sql error msg

* feat: support i18n for error msg

* feat: add all sql errorMsg unit test

* feat: update locale file and change i18n funtion name

* test: upate error unit test

* feat(flinksql): collect comment, type attribute for entity (#319)

* feat(flinksql): collect comment, type attribute for entity

* feat(flinksql): delete console log

* fix(#305): delete function ctxToWord,using ctxToText instead of ctxToWord

* feat: update attribute's type

* feat(flinksql): update flinksql's entitycollect unit test

* feat: optimize interface and update unit test

* feat: update collect attr detail

* feat: optimize interface and some function's arguments

* feat: add comment and update params' name

* feat: collect alias in select statement

* feat: update collect attribute function and update unit test

---------

Co-authored-by: zhaoge <>

* fix: spell check (#337)

Co-authored-by: liuyi <liuyi@dtstack.com>

* ci: check-types and test unit update

* feat: collect entity's attribute(#333)

* feat(trinosql): collect trino sql's attribute(comment,alias,colType)

* feat(hivesql): collect hive sql's attribute(comment,alias,colType)

* feat(impalasql): collect attribute(comment, colType, alias)

* feat(sparksql): collect entity's attribute (comment,alias, colType)

* feat: update endContextList of collect attribute

* feat(postgresql): collect hive sql's attribute(alias,colType)

* feat: update interface of attrInfo and alter entitycollect ts file

* feat(mysql): collect entity's attribute(comment,colType,alias)

* ci: fix check-types problem

---------

Co-authored-by: zhaoge <>

* chore(release): 4.1.0-beta.0

* fix: #362 set hiveVar value (#369)

* fix: #371 export EntityContext types (#372)

* fix: minimum collect candidates boundary to fix parse performance (#378)

* fix: minimum collect candidates boundary to fix parse performance

* fix: fix check-types

* fix: remove debugger code

* fix(flink): fix flinksql syntax error about ROW and function using (#383)

Co-authored-by: zhaoge <>

* build: pnpm antlr4 --lang all

---------

Co-authored-by: 霜序 <976060700@qq.com>
Co-authored-by: XCynthia <942884029@qq.com>
Co-authored-by: 琉易 <liuxy0551@qq.com>
Co-authored-by: liuyi <liuyi@dtstack.com>
Co-authored-by: zhaoge <>
Co-authored-by: Hayden <hayden9653@gmail.com>
Co-authored-by: JackWang032 <64318393+JackWang032@users.noreply.github.com>
mumiao added a commit that referenced this issue May 8, 2025
* feat: improve errorListener msg (#281)

* feat: add mysql errorListener and commonErrorListener

* feat: improve other sql error msg

* feat: support i18n for error msg

* feat: add all sql errorMsg unit test

* feat: update locale file and change i18n funtion name

* test: upate error unit test

* feat(flinksql): collect comment, type attribute for entity (#319)

* feat(flinksql): collect comment, type attribute for entity

* feat(flinksql): delete console log

* fix(#305): delete function ctxToWord,using ctxToText instead of ctxToWord

* feat: update attribute's type

* feat(flinksql): update flinksql's entitycollect unit test

* feat: optimize interface and update unit test

* feat: update collect attr detail

* feat: optimize interface and some function's arguments

* feat: add comment and update params' name

* feat: collect alias in select statement

* feat: update collect attribute function and update unit test

---------

Co-authored-by: zhaoge <>

* fix: spell check (#337)

Co-authored-by: liuyi <liuyi@dtstack.com>

* ci: check-types and test unit update

* feat: collect entity's attribute(#333)

* feat(trinosql): collect trino sql's attribute(comment,alias,colType)

* feat(hivesql): collect hive sql's attribute(comment,alias,colType)

* feat(impalasql): collect attribute(comment, colType, alias)

* feat(sparksql): collect entity's attribute (comment,alias, colType)

* feat: update endContextList of collect attribute

* feat(postgresql): collect hive sql's attribute(alias,colType)

* feat: update interface of attrInfo and alter entitycollect ts file

* feat(mysql): collect entity's attribute(comment,colType,alias)

* ci: fix check-types problem

---------

Co-authored-by: zhaoge <>

* chore(release): 4.1.0-beta.0

* fix: #362 set hiveVar value (#369)

* fix: #371 export EntityContext types (#372)

* fix: minimum collect candidates boundary to fix parse performance (#378)

* fix: minimum collect candidates boundary to fix parse performance

* fix: fix check-types

* fix: remove debugger code

* fix(flink): fix flinksql syntax error about ROW and function using (#383)

Co-authored-by: zhaoge <>

* build: pnpm antlr4 --lang all

* Feat/follow keywords (#407)

* feat: provide follow keywords when get suggestions

* chore: add watch script

* refactor: optimize spark grammar (#360)

* feat: support semantic context of isNewStatement (#361)

* feat: support semantic context of isStatamentBeginning

* docs: add docs for semantic context

* feat: unify variables in lexer (#366)

* feat: unify variables in lexer

* fix: all sql use WHITE_SPACE

* feat: complete after error syntax (#334)

* refactor: split getMinimumParserInfo to slice input and parser again

* test: complete after error syntax

* feat: complete after error syntax

* feat: use createParser to get parserIns and remove parserWithNewInput

* feat(all sql): add all sql expression column (#358)

* feat(impala): add impala expression column

* feat(trino): add expression column

* feat(hive): add hive expression column

* feat(spark): add spark expression column

* feat(mysql): add mysql expression column unit test

* feat(flink): add flink expression column

* feat(postgresql): add pg expression column

* feat: #410 optimize processCandidates tokenIndexOffset (#411)

* test: test suggestion wordRanges with range when processCandidates without tokenIndexOffset

* feat: #410 optimize processCandidates tokenIndexOffset

---------

Co-authored-by: 霜序 <976060700@qq.com>
Co-authored-by: XCynthia <942884029@qq.com>
Co-authored-by: 琉易 <liuxy0551@qq.com>
Co-authored-by: liuyi <liuyi@dtstack.com>
Co-authored-by: zhaoge <>
Co-authored-by: Hayden <hayden9653@gmail.com>
Co-authored-by: JackWang032 <64318393+JackWang032@users.noreply.github.com>
Co-authored-by: JackWang032 <2522134117@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants