[
https://issues.apache.org/jira/browse/BEAM-7699?focusedWorklogId=277460&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-277460
]
ASF GitHub Bot logged work on BEAM-7699:
----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Jul/19 12:24
Start Date: 16/Jul/19 12:24
Worklog Time Spent: 10m
Work Description: honeyAndSw commented on pull request #9009: [BEAM-7699]
Propagate null check/comparison to deepEquals
URL: https://github.com/apache/beam/pull/9009#discussion_r303878131
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/values/Row.java
##########
@@ -422,14 +422,8 @@ static int deepHashCode(Object a, Schema.FieldType
fieldType) {
V value = e.getValue();
V otherValue = b.get(key);
- if (value == null) {
- if (otherValue != null || !b.containsKey(key)) {
- return false;
- }
- } else {
- if (!deepEquals(value, otherValue, valueType)) {
- return false;
- }
+ if (!deepEquals(value, otherValue, valueType)) {
Review comment:
`RowTest#testCreateAndCompareNullableMapWithDifferentKey` covers this case,
what do you think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 277460)
Time Spent: 1h (was: 50m)
> Remove duplicated null checks in Row.equals
> -------------------------------------------
>
> Key: BEAM-7699
> URL: https://issues.apache.org/jira/browse/BEAM-7699
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-core
> Reporter: Naheon Kim
> Priority: Trivial
> Labels: easyfix, starter
> Time Spent: 1h
> Remaining Estimate: 0h
>
> After [BEAM-5866|https://issues.apache.org/jira/browse/BEAM-5866] andÂ
> [BEAM-7125|https://issues.apache.org/jira/browse/BEAM-7125] Row has
> duplicated null value checks.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)