Fix infinite loop during planning caused by PickTableLayout#17720
Fix infinite loop during planning caused by PickTableLayout#17720rschlussel merged 1 commit intoprestodb:masterfrom
Conversation
|
@highker you did approve this PR at #16627 but it was missing few tests. |
NikhilCollooru
left a comment
There was a problem hiding this comment.
For primitive types like int, please directly compare their values instead of using Objects.equals across this PR.
Direct value comparison for primitive types is much more efficient than Object.equals in Java
There was a problem hiding this comment.
expectedHashTableCount is of primitive type int. We can directly compare the values as it is much more efficient than using Object.equals
this.expectedHashTableCount == other.expectedHashTableCount
There was a problem hiding this comment.
For primitive types like int, please directly compare their values instead of using Object.equals , here and in other files.
|
@v-jizhang Please squash the commits into one commit. The code changes look good. |
Replaces prestodb#16627 Co-authored-by: Brian Li <librian415@gmail.com>
Squashed. Thank you! |
Custom hashcode and equal functions are introduced for xxxBlock in PR prestodb#17720, where content in the corresponding block rather than the object itself are used in hashcode and equal function computation. However, xxxBlockBuilder which also extends from Block interface is left behind. In this commit, we override such functions for block builder.
Replaces #16627
Co-authored-by: Brian Li librian415@gmail.com
Test plan - Added a test.