Skip to content

Commit

Permalink
fix .net can not read sr
Browse files Browse the repository at this point in the history
Signed-off-by: before-Sunrise <[email protected]>
  • Loading branch information
before-Sunrise committed Oct 15, 2024
1 parent 0c0ea45 commit fa1e954
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,10 @@ public Void visitVariableExpr(VariableExpr node, Scope context) {
node.getName().equalsIgnoreCase(SessionVariable.SQL_MODE)) {
node.setType(Type.VARCHAR);
node.setValue(SqlModeHelper.decode((long) node.getValue()));
} else if (!Strings.isNullOrEmpty(node.getName()) &&
node.getName().equalsIgnoreCase(SessionVariable.AUTO_COMMIT)) {
node.setType(Type.BIGINT);
node.setValue(((boolean) node.getValue()) ? (long) (1) : (long) 0);
}
} catch (DdlException e) {
throw new SemanticException(e.getMessage());
Expand Down

0 comments on commit fa1e954

Please sign in to comment.