Class RLikePatternList
java.lang.Object
org.elasticsearch.xpack.esql.core.expression.predicate.regex.AbstractStringPattern
org.elasticsearch.xpack.esql.core.expression.predicate.regex.RLikePatternList
- All Implemented Interfaces:
Writeable,StringPattern,NodeStringRenderable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a Java regex that matches any of the patterns in the list.protected org.apache.lucene.util.automaton.AutomatondoCreateAutomaton(boolean ignoreCase) Creates an automaton that matches any of the patterns in the list.booleaninthashCode()voidnodeString(StringBuilder sb, Node.NodeStringFormat format, NodeStringMapper mapper) Renders each pattern via its ownnodeStringso every element is sanitized: a single pattern renders bare, multiple render as a parenthesized list.pattern()Returns a string that matches any of the patterns in the list.voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.core.expression.predicate.regex.AbstractStringPattern
createAutomaton, exactMatch, extractPrefix, extractSuffix, matchesAll
-
Constructor Details
-
RLikePatternList
-
RLikePatternList
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
patternList
-
nodeString
Renders each pattern via its ownnodeStringso every element is sanitized: a single pattern renders bare, multiple render as a parenthesized list. UnderNodeStringMapper.IDENTITYthe single / empty cases match the legacy rendering; the multi-pattern case drops the redundant outer quotes.- Specified by:
nodeStringin interfaceNodeStringRenderable- Overrides:
nodeStringin classAbstractStringPattern
-
doCreateAutomaton
protected org.apache.lucene.util.automaton.Automaton doCreateAutomaton(boolean ignoreCase) Creates an automaton that matches any of the patterns in the list. We create a single automaton that is the union of all individual automatons to improve performance- Specified by:
doCreateAutomatonin classAbstractStringPattern
-
asJavaRegex
Returns a Java regex that matches any of the patterns in the list. The patterns are joined with the '|' operator to create a single regex.- Specified by:
asJavaRegexin interfaceStringPattern
-
hashCode
public int hashCode() -
equals
-
pattern
Returns a string that matches any of the patterns in the list. The patterns are joined with the '|' operator to create a single regex string.- Specified by:
patternin interfaceStringPattern
-