Before this PR:
The implementation of RowResult#equals currently uses Object#equals to compare column values. When the column value is of type byte[] this results in unexpected behavior, as values are compared by memory address, not by value.
After this PR:
This PR:
Adds some new tests for RowResult#equals, including some that currently fail.
Uses Objects#deepEquals to check if column names and values are equal. For byte[], this will use Arrays#equals, which compares byte arrays by value.
==COMMIT_MSG==
Fix RowResult value equality
==COMMIT_MSG==
Priority:
Concerns / possible downsides (what feedback would you like?): Are there any places that rely on the current equality behavior where this would be a breaking change?
Please tag any other people who should be aware of this PR:
@jeremyk-91
@sverma30
@raiju
What do the change types mean?
- `feature`: A new feature of the service.
- `improvement`: An incremental improvement in the functionality or operation of the service.
- `fix`: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
- `break`: Has the potential to break consumers of this service's API, inclusive of both Palantir services
and external consumers of the service's API (e.g. customer-written software or integrations).
- `deprecation`: Advertises the intention to remove service functionality without any change to the
operation of the service itself.
- `manualTask`: Requires the possibility of manual intervention (running a script, eyeballing configuration,
performing database surgery, ...) at the time of upgrade for it to succeed.
- `migration`: A fully automatic upgrade migration task with no engineer input required.
_Note: only one type should be chosen._
How are new versions calculated?
- ❗The `break` and `manual task` changelog types will result in a major release!
- 🐛 The `fix` changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
- ✨ All others will result in a minor version release.
General
Before this PR: The implementation of
RowResult#equals
currently usesObject#equals
to compare column values. When the column value is of typebyte[]
this results in unexpected behavior, as values are compared by memory address, not by value.After this PR: This PR:
RowResult#equals
, including some that currently fail.Objects#deepEquals
to check if column names and values are equal. Forbyte[]
, this will useArrays#equals
, which compares byte arrays by value.==COMMIT_MSG== Fix RowResult value equality ==COMMIT_MSG==
Priority:
Concerns / possible downsides (what feedback would you like?): Are there any places that rely on the current equality behavior where this would be a breaking change?
Please tag any other people who should be aware of this PR: @jeremyk-91 @sverma30 @raiju