Skip to content

Commit

Permalink
Fix parse variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
lingo-xp authored and wenshao committed Dec 11, 2024
1 parent b0872a5 commit 8cbc383
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions core/src/main/java/com/alibaba/druid/sql/parser/Lexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1279,9 +1279,6 @@ public final void nextToken() {

if (ch == '$') {
scanVariable();
if (isVariantChar(charAt(pos + 1))) {
scanVariable();
}
return;
}

Expand Down
4 changes: 4 additions & 0 deletions core/src/test/resources/bvt/parser/hive/0.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
select substr(${yesterday},1,4)
--------------------
SELECT substr(${yesterday}, 1, 4)
------------------------------------------------------------------------------------------------------------------------
CREATE TABLE if not exists iteblog_06(
name struct<guo:string,sheng:string,shi:string>, value string
)
Expand Down

0 comments on commit 8cbc383

Please sign in to comment.