Skip to content

Commit 65d956a

Browse files
committed
fixed minor issues
1 parent 931de7a commit 65d956a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

jdbc-v2/src/main/java/com/clickhouse/jdbc/DriverProperties.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public enum DriverProperties {
1818
* JDBC allows throwing SQLException for unsupported values and methods.
1919
* But driver can ignore them and continue execution. Driver will do no operation in such case.
2020
*/
21-
IGNORE_UNSUPPORTED_VALUES("jdbc_ignore_unsupported_values", "false"),
21+
IGNORE_UNSUPPORTED_VALUES("jdbc_ignore_unsupported_values", String.valueOf(Boolean.FALSE)),
2222

2323
/**
2424
* Schema term to be used in the connection URL. Only `schema` is supported right now.
@@ -28,7 +28,7 @@ public enum DriverProperties {
2828
/**
2929
* Indicates if driver should create a secure connection over SSL/TLS
3030
*/
31-
SECURE_CONNECTION("ssl", "false"),
31+
SECURE_CONNECTION("ssl", String.valueOf(Boolean.FALSE)),
3232

3333
/**
3434
* Query settings to be passed along with query operation.
@@ -41,12 +41,12 @@ public enum DriverProperties {
4141
* PreparedStatement is used. Has limitation and can be used with a simple form of insert like;
4242
* {@code INSERT INTO t VALUES (?, ?, ?...)}
4343
*/
44-
BETA_ROW_BINARY_WRITER("beta.row_binary_for_simple_insert", "false"),
44+
BETA_ROW_BINARY_WRITER("beta.row_binary_for_simple_insert", String.valueOf(Boolean.FALSE)),
4545

4646
/**
4747
* Enables closing result set before
4848
*/
49-
RESULTSET_AUTO_CLOSE("jdbc_resultset_auto_close", "true"),
49+
RESULTSET_AUTO_CLOSE("jdbc_resultset_auto_close", String.valueOf(Boolean.FALSE)),
5050

5151
/**
5252
* Enables using server property `max_result_rows` ({@link ServerSettings#MAX_RESULT_ROWS} to limit number of rows returned by query.
@@ -56,7 +56,7 @@ public enum DriverProperties {
5656
* this is fine. It is recommended to set limit in SQL query.
5757
*
5858
*/
59-
USE_MAX_RESULT_ROWS("jdbc_use_max_result_rows", "false"),
59+
USE_MAX_RESULT_ROWS("jdbc_use_max_result_rows", String.valueOf(Boolean.FALSE)),
6060
;
6161

6262

jdbc-v2/src/main/java/com/clickhouse/jdbc/ResultSetImpl.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import java.io.Reader;
1717
import java.io.StringReader;
1818
import java.math.BigDecimal;
19-
import java.net.SocketTimeoutException;
2019
import java.net.URL;
2120
import java.nio.charset.StandardCharsets;
2221
import java.sql.Blob;
@@ -58,8 +57,9 @@ public class ResultSetImpl implements ResultSet, JdbcV2Wrapper {
5857

5958
private int fetchSize;
6059
private int fetchDirection;
61-
final private int maxFieldSize;
62-
final private int maxRows;
60+
@SuppressWarnings("unused")
61+
private final int maxFieldSize;
62+
private final int maxRows;
6363

6464
private Consumer<Exception> onDataTransferException;
6565

@@ -114,6 +114,7 @@ public boolean next() throws SQLException {
114114
}
115115

116116
if (maxRows > 0 && rowPos == maxRows) {
117+
// rowPos is at current position. if we reached here it means we stepped over maxRows
117118
rowPos = AFTER_LAST;
118119
return false;
119120
}

jdbc-v2/src/test/java/com/clickhouse/jdbc/StatementTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import com.clickhouse.client.api.internal.ServerSettings;
55
import com.clickhouse.client.api.query.GenericRecord;
66
import com.clickhouse.data.ClickHouseVersion;
7-
import com.clickhouse.jdbc.internal.JdbcConfiguration;
87
import org.apache.commons.lang3.RandomStringUtils;
98
import org.slf4j.Logger;
109
import org.slf4j.LoggerFactory;

0 commit comments

Comments
 (0)