kabhishek4 commented on code in PR #1409:
URL: https://github.com/apache/phoenix/pull/1409#discussion_r2613646223
##########
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java:
##########
@@ -3303,6 +3304,30 @@ private static void throwIfInsufficientColumns(String
schemaName, String tableNa
}
}
+ public MutationState truncateTable(TruncateTableStatement statement)
throws SQLException {
+ String schemaName = connection.getSchema() != null &&
statement.getTableName().getSchemaName() == null
+ ? connection.getSchema() :
statement.getTableName().getSchemaName();
+ String tableName = statement.getTableName().getTableName();
+ boolean isNamespaceMapped =
SchemaUtil.isNamespaceMappingEnabled(statement.getTableType(),
connection.getQueryServices().getProps());
+ boolean wasAutoCommit = connection.getAutoCommit();
Review Comment:
done
##########
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 {
Review Comment:
done
--
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]