kabhishek4 commented on code in PR #1409:
URL: https://github.com/apache/phoenix/pull/1409#discussion_r2613647011
##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/TruncateTableIT.java:
##########
@@ -0,0 +1,186 @@
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Properties;
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.schema.TableNotFoundException;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(ParallelStatsDisabledTest.class)
+public class TruncateTableIT extends ParallelStatsDisabledIT {
+
+ @Test
+ public void testTruncateTable() throws SQLException {
+ Properties props = new Properties();
+ Connection conn = DriverManager.getConnection(getUrl(), props);
+ String tableName = generateUniqueName();
+ try {
+ String createTableDDL =
+ "CREATE TABLE " + tableName + " (pk char(2) not null primary
key)";
+ conn.createStatement().execute(createTableDDL);
+ conn.close();
+
+ conn = DriverManager.getConnection(getUrl(), props);
+ conn.setAutoCommit(true);
Review Comment:
removed
##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/TruncateTableIT.java:
##########
@@ -0,0 +1,186 @@
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Properties;
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.schema.TableNotFoundException;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(ParallelStatsDisabledTest.class)
+public class TruncateTableIT extends ParallelStatsDisabledIT {
+
+ @Test
+ public void testTruncateTable() throws SQLException {
+ Properties props = new Properties();
+ Connection conn = DriverManager.getConnection(getUrl(), props);
+ String tableName = generateUniqueName();
+ try {
+ String createTableDDL =
+ "CREATE TABLE " + tableName + " (pk char(2) not null primary
key)";
+ conn.createStatement().execute(createTableDDL);
+ conn.close();
+
+ conn = DriverManager.getConnection(getUrl(), props);
+ conn.setAutoCommit(true);
+ PreparedStatement stmt = conn.prepareStatement(
+ "UPSERT INTO " + tableName + " VALUES('a')");
+ stmt.execute();
+ conn.close();
+
+ conn = DriverManager.getConnection(getUrl(), props);
Review Comment:
addressed
--
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]