Shohei Okumiya
Shohei Okumiya
I feel that it is simple to implement such a logic. But it is also OK to use third party library if it is light(not such Netty).
I found Apache Commons Net. https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/util/SubnetUtils.html How about `SubnetInfo#isInRange` ? https://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/util/SubnetUtils.SubnetInfo.html#isInRange(java.lang.String)
I probably think the consensus is that this is not a blocker, but I try to rebase this pr promptly.
@deniskuzZ I rebased it
@kasakrisz I don't have any objections. The original intention is human-readability and floating-point error mitigation. [I tried to remove ROUND](https://github.com/apache/hive/pull/5283/commits/8b8136e4c856c276778874710d8eccb06a278152). To be fair, we observe difference between CBO and non-CBO....
> just 1 thing, maybe a new check should be moved to HiveCalciteUtil Thanks. I looked at the file and I am sure that it is the right place
I think @zabetak 's proposal is further better, and the last revision follows it. I tested some cases by hand and verified the approach would likely work in all known...