ChinmaySKulkarni commented on a change in pull request #569: PHOENIX-4743: 
ALTER TABLE ADD COLUMN for global index should not modify HBase metadata if 
failed
URL: https://github.com/apache/phoenix/pull/569#discussion_r317309158
 
 

 ##########
 File path: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
 ##########
 @@ -852,6 +854,39 @@ public void testDropMultipleColumns() throws Exception {
         conn1.close();
     }
 
+    @Test
+    public void testAlterTableOnGlobalIndex() throws Exception {
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(false);
+            Admin admin = 
conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin();
+            Statement stmt = conn.createStatement();
 
 Review comment:
   Can we reuse `stmt` throughout this test rather than calling 
`conn.createStatement()` again? Also, you can move this inside the 
try-with-resources block so the Statement object also gets closed at the end

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to