Tianyi Wang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10571 )

Change subject: IMPALA-7106: Print rewritten SQL correctly when log trace is 
enabled
......................................................................


Patch Set 5:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/10571/3/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java
File fe/src/main/java/org/apache/impala/analysis/SelectStmt.java:

http://gerrit.cloudera.org:8080/#/c/10571/3/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java@972
PS3, Line 972: .toSql()
> - FromClause does not extend from StatementBase.
I tried "SELECT * FROM (SELECT (CASE WHEN TRUE THEN 1 ELSE id END) FROM 
functional.alltypes UNION SELECT 1 + 1) v" on toRewrittenSql and it returns the 
unrewritten query. Isn't it wired to print the rewritten outmost select block 
but left the inline view original?


http://gerrit.cloudera.org:8080/#/c/10571/5/fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java
File fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java:

http://gerrit.cloudera.org:8080/#/c/10571/5/fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java@117
PS5, Line 117:     stmt.sqlString_ = null;
I don't quite understand why you chose to restore the sql string this way. Have 
you tried removing this line? I don't know what it's for but I expect we don't 
fundamentally need it.



--
To view, visit http://gerrit.cloudera.org:8080/10571
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iab58b0cc865135d261dd4a7f72be130f2e7bde53
Gerrit-Change-Number: 10571
Gerrit-PatchSet: 5
Gerrit-Owner: Fredy Wijaya <[email protected]>
Gerrit-Reviewer: Fredy Wijaya <[email protected]>
Gerrit-Reviewer: Tianyi Wang <[email protected]>
Gerrit-Reviewer: Vuk Ercegovac <[email protected]>
Gerrit-Comment-Date: Tue, 05 Jun 2018 21:47:59 +0000
Gerrit-HasComments: Yes

Reply via email to