seancfoley commented on a change in pull request #11634:
URL: https://github.com/apache/druid/pull/11634#discussion_r746247942
##########
File path:
processing/src/main/java/org/apache/druid/query/expression/IPv4AddressMatchExprMacro.java
##########
@@ -70,17 +71,17 @@ public Expr apply(final List<Expr> args)
throw new IAE(ExprUtils.createErrMsg(name(), "must have 2 arguments"));
}
- SubnetUtils.SubnetInfo subnetInfo = getSubnetInfo(args);
+ IPAddressString subnetInfo = getSubnetInfo(args);
Expr arg = args.get(0);
class IPv4AddressMatchExpr extends
ExprMacroTable.BaseScalarUnivariateMacroFunctionExpr
{
- private final SubnetUtils.SubnetInfo subnetInfo;
+ private final IPAddressString subnetString;
Review comment:
IPAddressString containment checks are optimized to be efficient (in
some cases more efficient than going straight to IPv4Address). So you could
use IPv4Address or IPAddressString, but I'd avoid storing both, there's not
much benefit to that.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]