This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new d6152a8666 Return true when _resultSet is not null (#10899)
d6152a8666 is described below
commit d6152a86668eb40a2028a9942285f7c181e0d432
Author: Zhuangda Zhu <[email protected]>
AuthorDate: Tue Jun 20 20:58:15 2023 -0400
Return true when _resultSet is not null (#10899)
---
.../main/java/org/apache/pinot/client/PinotPreparedStatement.java | 7 +------
.../src/main/java/org/apache/pinot/client/PinotStatement.java | 8 +-------
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git
a/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotPreparedStatement.java
b/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotPreparedStatement.java
index 98b777b3ac..8edac605d8 100644
---
a/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotPreparedStatement.java
+++
b/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotPreparedStatement.java
@@ -211,12 +211,7 @@ public class PinotPreparedStatement extends
AbstractBasePreparedStatement {
public boolean execute(String sql)
throws SQLException {
_resultSet = executeQuery(sql);
- if (_resultSet.next()) {
- _resultSet.beforeFirst();
- return true;
- } else {
- return false;
- }
+ return _resultSet != null;
}
@Override
diff --git
a/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotStatement.java
b/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotStatement.java
index fc36c4b34a..cdfd155d04 100644
---
a/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotStatement.java
+++
b/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotStatement.java
@@ -80,13 +80,7 @@ public class PinotStatement extends AbstractBaseStatement {
public boolean execute(String sql)
throws SQLException {
_resultSet = executeQuery(sql);
- if (_resultSet.next()) {
- _resultSet.beforeFirst();
- return true;
- } else {
- _resultSet = null;
- return false;
- }
+ return _resultSet != null;
}
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]