You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/11/10 04:53:42 UTC

[GitHub] [druid] seancfoley commented on a change in pull request #11634: Add IPAddress java library as dependency and migrate IPv4 functions to use the new library.

seancfoley commented on a change in pull request #11634:
URL: https://github.com/apache/druid/pull/11634#discussion_r746247610



##########
File path: processing/src/main/java/org/apache/druid/query/expression/IPv4AddressMatchExprMacro.java
##########
@@ -104,19 +105,21 @@ public ExprEval eval(final ObjectBinding bindings)
 
       private boolean isStringMatch(String stringValue)
       {
-        return IPv4AddressExprUtils.isValidAddress(stringValue) && subnetInfo.isInRange(stringValue);
+        IPv4Address iPv4Address = IPv4AddressExprUtils.parse(stringValue);

Review comment:
       If you intend to support IPv6 here at some point in time, you'd want to use IPAddressString here.  But since it's currently IPv4-specific at this time, you could stick with IPv4Address.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org