Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
morningman committed Dec 20, 2023
1 parent 2b2d3d0 commit 4bc7583
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,12 @@ public ExportStmt(TableRef tableRef, Expr whereExpr, String path,
this.lineDelimiter = DEFAULT_LINE_DELIMITER;
this.timeout = DEFAULT_TIMEOUT;

Optional<SessionVariable> optionalSessionVariable = Optional.ofNullable(
ConnectContext.get().getSessionVariable());
this.sessionVariables = optionalSessionVariable.orElse(VariableMgr.getDefaultSessionVariable());
// ConnectionContext may not exist when in replay thread
if (ConnectContext.get() != null) {
this.sessionVariables = VariableMgr.cloneSessionVariable(ConnectContext.get().getSessionVariable());
} else {
this.sessionVariables = VariableMgr.cloneSessionVariable(VariableMgr.getDefaultSessionVariable());
}
}

@Override
Expand Down

0 comments on commit 4bc7583

Please sign in to comment.