java.lang.Object
org.elasticsearch.xpack.esql.expression.function.scalar.convert.ParseIp

public class ParseIp extends Object
Fast IP parsing suitable for embedding in an EvalOperator.ExpressionEvaluator because they don't allocate memory on every run. Instead, it converts directly from utf-8 encoded strings into InetAddressPoint encoded ips.

This contains three parsing methods to handle the three ways ipv4 addresses have historically handled leading 0s, namely, reject them, treat them as decimal numbers, and treat them as leadingZerosAreOctal(org.apache.lucene.util.BytesRef, org.elasticsearch.compute.operator.BreakingBytesRefBuilder) numbers.

Note: We say "directly from utf-8" but, really, all of the digits in an ip are in the traditional 7-bit ascii range where utf-8 overlaps. So we just treat everything as 7-bit ascii. Anything that isn't in the range is an invalid ip anyway. Much love for the designers of utf-8 for making it this way.