Skip to content

Commit

Permalink
Reuse sessionProperty in SET SESSION grammer
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed Sep 23, 2024
1 parent f61fb9f commit 563f761
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ statement
(LIKE pattern=string (ESCAPE escape=string)?)? #showSession
| SET SESSION AUTHORIZATION authorizationUser #setSessionAuthorization
| RESET SESSION AUTHORIZATION #resetSessionAuthorization
| SET SESSION qualifiedName EQ expression #setSession
| SET SESSION sessionProperty #setSession
| RESET SESSION qualifiedName #resetSession
| START TRANSACTION (transactionMode (',' transactionMode)*)? #startTransaction
| COMMIT WORK? #commit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,8 @@ public Node visitShowSession(SqlBaseParser.ShowSessionContext context)
@Override
public Node visitSetSession(SqlBaseParser.SetSessionContext context)
{
return new SetSession(getLocation(context), getQualifiedName(context.qualifiedName()), (Expression) visit(context.expression()));
SessionProperty sessionProperty = (SessionProperty) visit(context.sessionProperty());
return new SetSession(getLocation(context), sessionProperty.getName(), sessionProperty.getValue());
}

@Override
Expand Down

0 comments on commit 563f761

Please sign in to comment.