[ 
https://issues.apache.org/jira/browse/PHOENIX-6973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765508#comment-17765508
 ] 

ASF GitHub Bot commented on PHOENIX-6973:
-----------------------------------------

payert commented on code in PR #1672:
URL: https://github.com/apache/phoenix/pull/1672#discussion_r1327029519


##########
phoenix-core/src/test/java/org/apache/phoenix/jdbc/CreateTableCompilerTest.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.jdbc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.phoenix.compile.MutationPlan;
+import org.apache.phoenix.execute.MutationState;
+import org.apache.phoenix.parse.CreateTableStatement;
+import org.apache.phoenix.query.BaseConnectionlessQueryTest;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+public class CreateTableCompilerTest extends BaseConnectionlessQueryTest {
+
+  @Test
+  public void testCreateTableWithNoVerify() throws SQLException {
+    String ddl = "CREATE TABLE A (K VARCHAR PRIMARY KEY DESC) NOVERIFY";
+    try (Connection conn = DriverManager.getConnection(getUrl());
+         PhoenixStatement phoenixStatement = 
conn.createStatement().unwrap(PhoenixStatement.class)) {
+      /* Test is placed to 'org.apache.phoenix.jdbc' package to be able to 
access 'CompilableStatement'

Review Comment:
   Yes, I agree about not introducing new test class. I have separated the 
tests to check the statement and the mutation in different tests and different 
test classes, so I could delete this test class without compromising on what we 
test.



##########
phoenix-core/src/test/java/org/apache/phoenix/compile/PostIndexDDLCompilerTest.java:
##########
@@ -17,18 +17,25 @@
  */
 package org.apache.phoenix.compile;
 
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.SQLException;
+import java.util.Properties;
 
+import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixStatement;
+import org.apache.phoenix.parse.CreateTableStatement;
 import org.apache.phoenix.query.BaseConnectionlessQueryTest;
 import org.apache.phoenix.schema.PTable;
 import org.apache.phoenix.schema.PTableKey;
 import org.apache.phoenix.schema.TableRef;
+import org.apache.phoenix.util.PropertiesUtil;

Review Comment:
   fixed





> Add option to CREATE TABLE to skip verification of HBase table
> --------------------------------------------------------------
>
>                 Key: PHOENIX-6973
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6973
>             Project: Phoenix
>          Issue Type: New Feature
>          Components: core
>            Reporter: Tamas Payer
>            Assignee: Tamas Payer
>            Priority: Major
>             Fix For: 5.2.0
>
>
> When a Phoenix table is restored from snapshot we should have the option to 
> skip the lengthy validation process. CREATE TABLE should have an option to 
> skip the verification.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to