diff --git a/ppl-spark-integration/src/main/java/org/opensearch/sql/expression/function/SerializableUdf.java b/ppl-spark-integration/src/main/java/org/opensearch/sql/expression/function/SerializableUdf.java index 596a6a295..e931175ff 100644 --- a/ppl-spark-integration/src/main/java/org/opensearch/sql/expression/function/SerializableUdf.java +++ b/ppl-spark-integration/src/main/java/org/opensearch/sql/expression/function/SerializableUdf.java @@ -148,11 +148,10 @@ public Boolean apply(String ipAddress, String cidrBlock) { class geoIpUtils { /** - * Append values to JSON arrays based on specified path-values. + * Checks if provided ip string is ipv4 or ipv6. * - * @param jsonStr The input JSON string. - * @param elements A list of path-values where the first item is the path and subsequent items are values to append. - * @return The updated JSON string. + * @param ipAddress To input ip string. + * @return true if ipAddress is ipv4, false if ipaddress is ipv6, AddressString Exception if invalid ip. */ public static Function1 isIpv4 = new SerializableAbstractFunction1<>() { @@ -178,11 +177,10 @@ public Boolean apply(String ipAddress) { }; /** - * Append values to JSON arrays based on specified path-values. + * Convert ipAddress string to interger representation * - * @param jsonStr The input JSON string. - * @param elements A list of path-values where the first item is the path and subsequent items are values to append. - * @return The updated JSON string. + * @param ipAddress The input ip string. + * @return converted BigInteger from ipAddress string. */ public static Function1 ipToInt = new SerializableAbstractFunction1<>() { @Override @@ -204,10 +202,10 @@ abstract class SerializableAbstractFunction1 extends AbstractFunction1 expressions) { switch (funcName) {