You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2018/06/05 20:37:06 UTC

[Impala-ASF-CR] IMPALA-7110. Fix errors from error-prone

Hello Bharath Vissapragada, Philip Zeyliger, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10583

to look at the new patch set (#2).

Change subject: IMPALA-7110. Fix errors from error-prone
......................................................................

IMPALA-7110. Fix errors from error-prone

* Fixes several cases of Preconditions.checkNotNull(<bool>) which were
  ineffective. Instead, we should use Preconditions.checkState.

* Fixed a case of synchronizing on a non-final class member, which is a
  bad practice.

* Fixed a case of trying to stringify an array instead of using Joiner
  to join it to a human-readable representation.

* Fixed a couple cases where the format string in String.format didn't
  match the number of arguments passed.

* Fixed a test where PrimitiveType objects were being used to look up
  elements in a Map<ScalarType, String>. This would always return null,
  so the test was ineffective.

I elected not to enable error-prone in the default maven profile since
it increases compilation time noticeably. It can be enabled by running
'mvn -Perrorprone'.

Even with this patch there are a bunch of warnings -- this only
addresses the issues that errorprone considers "errors".

Change-Id: Ie9bfadecb5b92bba4fc7921a6f87f249ed90e771
---
M fe/pom.xml
M fe/src/main/java/org/apache/impala/analysis/CreateUdfStmt.java
M fe/src/main/java/org/apache/impala/analysis/LiteralExpr.java
M fe/src/main/java/org/apache/impala/analysis/Path.java
M fe/src/main/java/org/apache/impala/catalog/DiskIdMapper.java
M fe/src/main/java/org/apache/impala/catalog/ScalarFunction.java
M fe/src/main/java/org/apache/impala/catalog/StructType.java
M fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java
M fe/src/test/java/org/apache/impala/analysis/ParserTest.java
M fe/src/test/java/org/apache/impala/hive/executor/UdfExecutorTest.java
11 files changed, 51 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/83/10583/2
-- 
To view, visit http://gerrit.cloudera.org:8080/10583
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie9bfadecb5b92bba4fc7921a6f87f249ed90e771
Gerrit-Change-Number: 10583
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <ph...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>