fx19880617 commented on a change in pull request #6570:
URL: https://github.com/apache/incubator-pinot/pull/6570#discussion_r574219867



##########
File path: 
pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotPreparedStatement.java
##########
@@ -154,6 +154,37 @@ public void clearParameters()
     _preparedStatement = new PreparedStatement(_session, new 
Request(QUERY_FORMAT, _query));
   }
 
+  @Override
+  public boolean execute()
+      throws SQLException {
+    _resultSet = executeQuery();
+    if (_resultSet.next()) {
+      _resultSet.beforeFirst();
+      return true;
+    } else {
+      _resultSet = null;
+      return false;
+    }
+  }
+
+  @Override
+  public ResultSet executeQuery(String sql)
+      throws SQLException {
+    validateState();
+    try {
+      Request request = new Request(QUERY_FORMAT, sql);
+      _resultSetGroup = _session.execute(request);
+      if (_resultSetGroup.getResultSetCount() == 0) {
+        _resultSet = PinotResultSet.empty();
+        return _resultSet;
+      }
+      _resultSet = new PinotResultSet(_resultSetGroup.getResultSet(0));
+      return _resultSet;

Review comment:
       return new PinotResultSet(_resultSetGroup.getResultSet(0));




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to