stoty commented on code in PR #2079:
URL: https://github.com/apache/phoenix/pull/2079#discussion_r2000226083


##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/ShowCreateTableIT.java:
##########
@@ -350,4 +350,24 @@ public void testShowCreateTableIndex() throws Exception {
         assertTrue("Expected: " + createIndex + "\nResult: " + rs.getString(1),
                 rs.getString(1).contains(createIndex));
     }
+
+    @Test
+    public void testShowCreateTableUsingSqlline() throws Exception {

Review Comment:
   This is not actually using sqlline, but straight JDBC, please rename.



##########
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java:
##########
@@ -430,6 +430,13 @@ private PhoenixResultSet executeQuery(final 
CompilableStatement stmt,
                                         newResultSet(resultIterator, 
plan.getProjector(),
                                                 plan.getContext());
                                 // newResultset sets lastResultset
+                                // 
ExecutableShowCreateTable/ExecutableShowTablesStatement/ExecutableShowSchemasStatement
 using a delegateStmt
+                                // to compile a queryPlan, the resultSet will 
set to the delegateStmt, so need set resultSet
+                                // to the origin statement.
+                                if (stmt instanceof ExecutableShowCreateTable 
|| stmt instanceof ExecutableShowTablesStatement

Review Comment:
   This is slower than just setting the value, and can break if more similar 
types are added.
   Just call setLatResultSet unconditionally.



-- 
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: [email protected]

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

Reply via email to