Paul Rogers has posted comments on this change. ( http://gerrit.cloudera.org:8080/11954 )
Change subject: IMPALA-7867 (Part 1): Expose List in TreeNode, parser ...................................................................... Patch Set 3: (3 comments) Addressed code review comments. Please take another look at your convenience. http://gerrit.cloudera.org:8080/#/c/11954/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/11954/2//COMMIT_MSG@6 PS2, Line 6: : IMPALA-7867 (Part 1 > nit: IMPALA-7876 (part 1) is usually the preferred form. Done http://gerrit.cloudera.org:8080/#/c/11954/2/fe/src/main/cup/sql-parser.cup File fe/src/main/cup/sql-parser.cup: http://gerrit.cloudera.org:8080/#/c/11954/2/fe/src/main/cup/sql-parser.cup@60 PS2, Line 60: > Can we clean up the imports as well? I don't think we need Guava Imports an Cleaned up unused imports. We still use Guava Lists.newArrayList(x) to create one-item lists; a method for which there is no handy JDK equivalent. http://gerrit.cloudera.org:8080/#/c/11954/2/fe/src/main/java/org/apache/impala/common/TreeNode.java File fe/src/main/java/org/apache/impala/common/TreeNode.java: http://gerrit.cloudera.org:8080/#/c/11954/2/fe/src/main/java/org/apache/impala/common/TreeNode.java@62 PS2, Line 62: ult = new A > I don't see the reason for replacing TreeNode<NodeType> with TreeNode<?>., Reverted this for now. The problem is that this method appears to be type-safe, but it is not. Because of type erasure, the parameterized type is not available at runtime. Thus the original "(C) this" cast is not runtime safe, it is only a compile time check. Since it is inherently type-unsafe, the IDE issues a warning. Since we know it is type-unsafe, and want to proceed, we add the suppress warnings to state our intent. This is a bit of a tricky area when using Java generics. I'll research it and see if there is a cleaner solution we can retrofit into this existing code. -- To view, visit http://gerrit.cloudera.org:8080/11954 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iebab7dccdb4b2fa0b5ca812beab0e8bdba39f539 Gerrit-Change-Number: 11954 Gerrit-PatchSet: 3 Gerrit-Owner: Paul Rogers <par0...@yahoo.com> Gerrit-Reviewer: Fredy Wijaya <fwij...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Paul Rogers <par0...@yahoo.com> Gerrit-Comment-Date: Tue, 20 Nov 2018 22:43:29 +0000 Gerrit-HasComments: Yes