Interface NodeStringMapper
Node.nodeString rendering. Pairs with
Node.NodeStringFormat: format controls output shape (truncation, width); this mapper
controls how column / index names and literal values are emitted. Each nodeString
implementation that mentions an identifier or literal asks the mapper for the value to emit.
All methods are abstract on purpose: every implementer must make a deliberate decision per
identifier kind. A default method here would let a partial override silently inherit
pass-through behavior for the methods it didn't define, which is exactly the leak vector this
SPI exists to prevent. The IDENTITY constant is one concrete implementation of the
contract — pass-through for all three kinds — embedded here so call sites that want the raw
rendering can name it directly.
Stays narrow on purpose: only three methods, all generic. Pattern-bearing classes (Dissect,
Grok, RegexMatch, UnresolvedNamePattern, ...) parse their own pattern structure and route each
extracted capture / identifier through column(java.lang.String); the mapper never carries syntax-
specific knowledge. Adding a new pattern type doesn't touch this interface.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionMap a column / attribute / alias / qualifier / pattern capture name.Map an index pattern / concrete index / view / enrich-policy index name.Map a literal value of the given data type.Map a free-form / opaque text fragment that carries no parseable identifier structure — a raw LuceneQueryBuilderDSL, a sort or stats descriptor, an external source path.
-
Field Details
-
IDENTITY
Pass-through. The default for raw rendering.
-
-
Method Details
-
column
Map a column / attribute / alias / qualifier / pattern capture name. -
index
Map an index pattern / concrete index / view / enrich-policy index name. -
literal
Map a literal value of the given data type. Returns just the value portion;"[type]"suffix is appended by the caller so"5[LONG]"and"0[LONG]"share the same shape. -
opaque
Map a free-form / opaque text fragment that carries no parseable identifier structure — a raw LuceneQueryBuilderDSL, a sort or stats descriptor, an external source path. Returns the text verbatim underIDENTITY; an anonymizing mapper returns a redaction marker, since such text can't be safely tokenized without risking a partial leak. Lets a node keep the field in place with no== IDENTITYbranch — same shape, redacted value.
-