Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import java.math.BigInteger;
import java.nio.IntBuffer;
import java.util.Objects;

/**
* This code was based on code from Microsoft's PolyBase.
Expand Down Expand Up @@ -683,7 +684,7 @@ public void subtractDestructive(SignedInt128 right) {
*/
public static void multiply(SignedInt128 left, SignedInt128 right,
SignedInt128 result) {
if (result == left || result == right) {
if (Objects.equals(result, left) || Objects.equals(result, right)) {
throw new IllegalArgumentException(
"result object cannot be left or right operand");
}
Expand Down Expand Up @@ -768,7 +769,7 @@ public int divideDestructive(int right) {
*/
public static void divide(SignedInt128 left, SignedInt128 right,
SignedInt128 quotient, SignedInt128 remainder) {
if (quotient == left || quotient == right) {
if (Objects.equals(quotient, left) || Objects.equals(quotient, right)) {
throw new IllegalArgumentException(
"result object cannot be left or right operand");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Stack;

import org.apache.hadoop.hive.ql.exec.CommonJoinOperator;
Expand Down Expand Up @@ -114,7 +115,7 @@ private void combineLimits(LimitOperator childLimit) throws SemanticException {
LimitOperator parentLimit = (LimitOperator) childLimit.getParentOperators().get(0);
LimitDesc parentConf = parentLimit.getConf();
LimitDesc childConf = childLimit.getConf();
if (parentConf.getOffset() == childConf.getOffset()) {
if (Objects.equals(parentConf.getOffset(), childConf.getOffset())) {
int min = Math.min(parentConf.getLimit(), childConf.getLimit());
LOG.debug("Combining two limits child={}, parent={}, newLimit={}", childLimit, parentLimit, min);
parentConf.setLimit(min);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ public boolean isDistanceGreaterPrimitive(Double d1, Double d2, int amt) {
@Override
public boolean isEqualPrimitive(Double d1, Double d2) {
if (d1 != null && d2 != null) {
return d1 == d2;
return d1.equals(d2);
}

return d1 == null && d2 == null; // True if both are null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ alice brown 25.258749999999996
alice brown 25.529374999999998
alice brown 25.63012987012987
alice brown 26.472439024390237
alice brown 27.27881720430106
alice brown 27.100638297872322
Copy link
Contributor

@SourabhBadhya SourabhBadhya May 18, 2025

Choose a reason for hiding this comment

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

https://github.com/apache/hive/pull/5743/files#diff-3ed1e47d0499aed223f40aaacf7d3b5d17ec6c6e63d3f986209c0c217bcdb513R930
I am seeing references of window function using the isEqualPrimitive() in its function call stack. I am assuming this to be the reason why this value is changing. Can you please validate if this query is indeed touching upon isEqualPrimitive() in ValueBoundaryScanner?

alice brown 28.227894736842114
alice brown 44.05
alice carson 22.345500000000005
Expand Down
Loading