From bef53cc15bcf464cff9cbfdddfdd187035c37f35 Mon Sep 17 00:00:00 2001 From: currantw Date: Tue, 29 Oct 2024 12:00:59 -0700 Subject: [PATCH] Fix failing `IPFunction` unit tests. Signed-off-by: currantw --- .../main/java/org/opensearch/sql/expression/ip/IPFunction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/opensearch/sql/expression/ip/IPFunction.java b/core/src/main/java/org/opensearch/sql/expression/ip/IPFunction.java index b87e9cf795..ce5e6b8c92 100644 --- a/core/src/main/java/org/opensearch/sql/expression/ip/IPFunction.java +++ b/core/src/main/java/org/opensearch/sql/expression/ip/IPFunction.java @@ -72,7 +72,7 @@ private ExprValue exprCidr(ExprValue addressExprValue, ExprValue rangeExprValue) InetAddress rangeAddress = InetAddresses.forString(rangeAddressString); // Address and range must use the same IP version (IPv4 or IPv6). - if (address.getClass().equals(rangeAddress.getClass())) { + if (!address.getClass().equals(rangeAddress.getClass())) { return ExprValueUtils.booleanValue(false); }