ayushtkn commented on code in PR #6563:
URL: https://github.com/apache/hive/pull/6563#discussion_r3490892428
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/show/ShowCreateTableOperation.java:
##########
@@ -54,7 +54,7 @@ public int execute() throws HiveException {
DDLPlanUtils ddlObj = new DDLPlanUtils();
String command;
if (table.isView()) {
- command = ddlObj.getCreateViewCommand(table, desc.isRelative());
+ command = ddlObj.getCreateViewCommand(table,
desc.isRelative()).replace("\t", "\\t");
Review Comment:
I don't think the solution is correct. After this change, If a user copies
this SHOW CREATE TABLE output to recreate the view, the execution will fail
with a syntax error.
You can see the side effect directly in the .out file you provided:
```
CREATE VIEW `showcrt_tab_src_v` AS SELECT `showcrt_tab_src`.`val1`,
`showcrt_tab_src`.`val2`, `showcrt_tab_src`.`val3` FROM
`default`.`showcrt_tab_src`
\tWHERE `showcrt_tab_src`.`val1`\t= 'a1'
\tAND `showcrt_tab_src`.`val2`\t= 'b1'
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]