You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/07/28 05:36:03 UTC

[GitHub] [phoenix] chrajeshbabu commented on a change in pull request #1271: PHOENIX-6518 Implement SHOW CREATE STATEMENT SQL command

chrajeshbabu commented on a change in pull request #1271:
URL: https://github.com/apache/phoenix/pull/1271#discussion_r677984039



##########
File path: phoenix-core/src/main/antlr3/PhoenixSQL.g
##########
@@ -496,6 +498,11 @@ show_node returns [ShowStatement ret]
     |   SHOW SCHEMAS (LIKE pattern=string_literal)? { $ret = factory.showSchemasStatement(pattern); }
     ;
 
+// Parse a describe statement. SHOW CREATE STATEMENT tablename ...
+show_create_statement_node returns [ShowCreateStatement ret]
+    :   SHOW CREATE STATEMENT tablename=from_table_name { $ret = factory.showCreateStatement(tablename); }

Review comment:
       Can we make it "SHOW CREATE TABLE" than "SHOW CREATE STATEMENT" to adhere to other databases like mysql.
   
   https://dev.mysql.com/doc/refman/8.0/en/show-create-table.html
   https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-show-create-table.html
   https://prestodb.io/docs/current/sql/show-create-table.html

##########
File path: phoenix-core/src/main/antlr3/PhoenixSQL.g
##########
@@ -496,6 +498,11 @@ show_node returns [ShowStatement ret]
     |   SHOW SCHEMAS (LIKE pattern=string_literal)? { $ret = factory.showSchemasStatement(pattern); }
     ;
 
+// Parse a describe statement. SHOW CREATE STATEMENT tablename ...
+show_create_statement_node returns [ShowCreateStatement ret]
+    :   SHOW CREATE STATEMENT tablename=from_table_name { $ret = factory.showCreateStatement(tablename); }

Review comment:
       Would be better to support to get the statements for index as well as views also. May be another JIRA.




-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org