Skip to content

Fix equalsAndHashCode in ClientCompactQueryTuningConfig#9035

Merged
jon-wei merged 3 commits intoapache:masterfrom
suneet-s:equals
Dec 16, 2019
Merged

Fix equalsAndHashCode in ClientCompactQueryTuningConfig#9035
jon-wei merged 3 commits intoapache:masterfrom
suneet-s:equals

Conversation

@suneet-s
Copy link
Copy Markdown
Contributor

@suneet-s suneet-s commented Dec 13, 2019

Fixes #8866.

Description

This change introduces a dependency to EqualsVerifier for the test scope.
The dependency is licensed under Apache 2. The library makes it trivial
to add equals and hashCode checks to prevent bugs like this from happening
in the future


This PR has:

  • been self-reviewed.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths.

This change introduces a dependency to EqualsVerifier for the test scope.
The dependency is licensed under Apache 2. The library makes it trivial
to add equals and hashCode checks to prevent bugs like this from happening
in the future
@suneet-s
Copy link
Copy Markdown
Contributor Author

Licenses not added to the yaml file since the dependency is a test only dependency. It's licensed under apache 2 though - https://github.com/jqno/equalsverifier/blob/master/LICENSE.md

Copy link
Copy Markdown
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than naming comment

public class ClientCompactQueryTuningConfigTest
{
@Test
public void test_equalsContract()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testEqualsContract would be more typical Druid style.

Copy link
Copy Markdown
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 , thanks @suneet-s

@jon-wei jon-wei merged commit 301c064 into apache:master Dec 16, 2019
@suneet-s suneet-s deleted the equals branch December 16, 2019 23:06
suneet-s added a commit to suneet-s/druid that referenced this pull request Dec 16, 2019
* Fix equalsAndHashCode in ClientCompactQueryTuningConfig

This change introduces a dependency to EqualsVerifier for the test scope.
The dependency is licensed under Apache 2. The library makes it trivial
to add equals and hashCode checks to prevent bugs like this from happening
in the future

* fix checkstyle

* fix test name
jon-wei pushed a commit that referenced this pull request Dec 17, 2019
* Fix equalsAndHashCode in ClientCompactQueryTuningConfig

This change introduces a dependency to EqualsVerifier for the test scope.
The dependency is licensed under Apache 2. The library makes it trivial
to add equals and hashCode checks to prevent bugs like this from happening
in the future

* fix checkstyle

* fix test name
suneet-s added a commit to implydata/druid-public that referenced this pull request Dec 17, 2019
…apache#9051)

* Fix equalsAndHashCode in ClientCompactQueryTuningConfig

This change introduces a dependency to EqualsVerifier for the test scope.
The dependency is licensed under Apache 2. The library makes it trivial
to add equals and hashCode checks to prevent bugs like this from happening
in the future

* fix checkstyle

* fix test name
suneet-s added a commit to implydata/druid-public that referenced this pull request Dec 18, 2019
…apache#9051) (#22)

This change introduces a dependency to EqualsVerifier for the test scope.
The dependency is licensed under Apache 2. The library makes it trivial
to add equals and hashCode checks to prevent bugs like this from happening
in the future
@jihoonson jihoonson added this to the 0.18.0 milestone Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

splitHintSpec is not added to ClientCompactQueryTuningConfig's equals(), hashCode(), and toString()

4 participants