haridsv commented on code in PR #2226: URL: https://github.com/apache/phoenix/pull/2226#discussion_r2255814260
########## phoenix-core-client/src/main/java/org/apache/phoenix/util/TupleUtil.java: ########## @@ -226,14 +226,16 @@ public static int write(Tuple result, DataOutput out) throws IOException { /** * Convert the given Tuple containing list of Cells to ResultSet with similar effect as if SELECT * * FROM <table-name> is queried. - * @param toProject Tuple to be projected. - * @param tableName Table name. - * @param conn Phoenix Connection object. + * @param toProject Tuple to be projected. + * @param tableName Table name. + * @param conn Phoenix Connection object. + * @param withPrefetch When {@code true}, the returned ResultSet is prefetched, otherwise one + * needs to call next() on it. * @return ResultSet for the give single row. * @throws SQLException If any SQL operation fails. */ - public static ResultSet getResultSet(Tuple toProject, TableName tableName, Connection conn) - throws SQLException { + public static ResultSet getResultSet(Tuple toProject, TableName tableName, Connection conn, + boolean withPrefetch) throws SQLException { Review Comment: > The purpose of the utility is to always return the prefetched result Not from the point of JDBC standard. JDBC always expects the client to invoke next() before the row is made available. The prefetch here is kind of a misnomer, it is not really a fetch from the server but just indicating the iterator semantics. ########## phoenix-core-client/src/main/java/org/apache/phoenix/util/TupleUtil.java: ########## @@ -226,14 +226,16 @@ public static int write(Tuple result, DataOutput out) throws IOException { /** * Convert the given Tuple containing list of Cells to ResultSet with similar effect as if SELECT * * FROM <table-name> is queried. - * @param toProject Tuple to be projected. - * @param tableName Table name. - * @param conn Phoenix Connection object. + * @param toProject Tuple to be projected. + * @param tableName Table name. + * @param conn Phoenix Connection object. + * @param withPrefetch When {@code true}, the returned ResultSet is prefetched, otherwise one + * needs to call next() on it. * @return ResultSet for the give single row. * @throws SQLException If any SQL operation fails. */ - public static ResultSet getResultSet(Tuple toProject, TableName tableName, Connection conn) - throws SQLException { + public static ResultSet getResultSet(Tuple toProject, TableName tableName, Connection conn, + boolean withPrefetch) throws SQLException { Review Comment: > The purpose of the utility is to always return the prefetched result Not from the point of JDBC standard. JDBC always expects the client to invoke next() before the row is made available. The prefetch here is kind of a misnomer, it is not really a fetch from the server but just indicating the iterator semantics. -- 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. To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org