Skip to content

Commit

Permalink
Add suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dheyman committed Jun 27, 2024
1 parent 263ca41 commit 7b65b2f
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.*;
import java.util.regex.Pattern;
import net.snowflake.client.core.ObjectMapperFactory;
import net.snowflake.client.core.SFBaseSession;
Expand Down Expand Up @@ -924,13 +919,9 @@ public int getMaxBinaryLiteralLength() throws SQLException {
public int getMaxCharLiteralLength() throws SQLException {
logger.trace("int getMaxCharLiteralLength()", false);
raiseSQLExceptionIfConnectionIsClosed();
int length = DEFAULT_MAX_LOB_SIZE;
Integer maxLiteralLengthFromSession =
(Integer) session.getOtherParameter(MAX_VARCHAR_BINARY_SIZE_PARAM_NAME);
if (maxLiteralLengthFromSession != null) {
length = maxLiteralLengthFromSession;
}
return length;
Optional<Integer> maxLiteralLengthFromSession =
Optional.ofNullable((Integer) session.getOtherParameter(MAX_VARCHAR_BINARY_SIZE_PARAM_NAME));
return maxLiteralLengthFromSession.orElse(DEFAULT_MAX_LOB_SIZE);
}

@Override
Expand Down

0 comments on commit 7b65b2f

Please sign in to comment.