[
https://issues.apache.org/jira/browse/PHOENIX-6518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17388471#comment-17388471
]
ASF GitHub Bot commented on PHOENIX-6518:
-----------------------------------------
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: [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)