[
https://issues.apache.org/jira/browse/PHOENIX-6518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17385467#comment-17385467
]
ASF GitHub Bot commented on PHOENIX-6518:
-----------------------------------------
richardantal commented on a change in pull request #1271:
URL: https://github.com/apache/phoenix/pull/1271#discussion_r674751278
##########
File path:
phoenix-core/src/it/java/org/apache/phoenix/end2end/ShowCreateStatementIT.java
##########
@@ -0,0 +1,79 @@
+/*
+ * 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.end2end;
+
+import org.apache.phoenix.util.SchemaUtil;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import static org.junit.Assert.assertTrue;
+
+public class ShowCreateStatementIT extends ParallelStatsDisabledIT {
+ @Test
+ public void testDescribebasic() throws Exception {
+ Properties props = new Properties();
+ Connection conn = DriverManager.getConnection(getUrl(), props);
+ String tableName = generateUniqueName();
+ String ddl = "CREATE TABLE " + tableName + "(K VARCHAR NOT NULL
PRIMARY KEY, INT INTEGER)";
+ conn.createStatement().execute(ddl);
+
+ ResultSet rs = conn.createStatement().executeQuery("SHOW CREATE
STATEMENT " + tableName );
+ assertTrue(rs.next());
+ System.out.println(ddl);
+ System.out.println(rs.getString(1));
+ assertTrue(rs.getString(1).contains(ddl));
+ }
+
+ @Ignore
Review comment:
https://issues.apache.org/jira/browse/PHOENIX-6519
--
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]
> Implement SHOW CREATE STATEMENT SQL command
> -------------------------------------------
>
> Key: PHOENIX-6518
> URL: https://issues.apache.org/jira/browse/PHOENIX-6518
> Project: Phoenix
> Issue Type: Task
> Components: core
> Reporter: Richárd Antal
> Assignee: Richárd Antal
> Priority: Major
>
> With PHOENIX-5946 and PHOENIX-6454 it is possible to generate effective DDL
> for a table/view/index using the SchemaTool and an hbase command.
> Implement SHOW CREATE STATEMENT sql command to further utilize this
> functionality.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)