Hello Quanlong Huang, Kurt Deschler, Abhishek Rawat, Joe McDonnell, Impala 
Public Jenkins,

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

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

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

Change subject: IMPALA-12800: Implement hashCode everywhere
......................................................................

IMPALA-12800: Implement hashCode everywhere

Fixes a regression in earlier IMPALA-12800 commits where two decimal
ScalarTypes could be equal, but have different hash codes. That led to
different lookup behavior, where iterating through lhs_ (the old method)
would find a similar expression via equals, but when looking up via the
substitutions_ map it would resolve a different hash code and return
null (no match). That caused analysis to fail on statements that used
the same cast-to-decimal expression twice, as one of them would fail to
find a result in ExprSubstitutionMap and lead to an unbound slot

  ERROR: AnalysisException: select list expression not produced by
  aggregation output (missing from GROUP BY clause?): <expr>...

Overrides hashCode on every class that overrides equals to avoid other
cases that might be untested, and avoid similar mistakes in the future.
https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
requires "If two objects are equal according to the equals(Object)
method, then calling the hashCode method on each of the two objects must
produce the same integer result", which requires an explicit hashCode
implementation anywhere we override equals.

Adds a unit test covering the regression.

Change-Id: I129bff6fd0968be135e23e0b24e273b2ea384eca
---
M fe/src/main/java/org/apache/impala/analysis/ColumnDef.java
M fe/src/main/java/org/apache/impala/analysis/PlanHint.java
M fe/src/main/java/org/apache/impala/catalog/ArrayType.java
M fe/src/main/java/org/apache/impala/catalog/IcebergStructField.java
M fe/src/main/java/org/apache/impala/catalog/MapType.java
M fe/src/main/java/org/apache/impala/catalog/ScalarType.java
M fe/src/main/java/org/apache/impala/catalog/StructType.java
M fe/src/main/java/org/apache/impala/catalog/TopicUpdateLog.java
M fe/src/main/java/org/apache/impala/planner/DataPartition.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java
10 files changed, 89 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/50/21550/3
--
To view, visit http://gerrit.cloudera.org:8080/21550
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I129bff6fd0968be135e23e0b24e273b2ea384eca
Gerrit-Change-Number: 21550
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>

Reply via email to