public class EvaluatingNormalizer
extends java.lang.Object
E.g.: The query
and(true, eq(column_ref, 'someliteral'))
will be changed to
eq(column_ref, 'someliteral')
Constructor and Description |
---|
EvaluatingNormalizer(Functions functions,
RowGranularity granularity,
ReplaceMode replaceMode,
ReferenceResolver<? extends Input<?>> referenceResolver,
FieldResolver fieldResolver) |
Modifier and Type | Method and Description |
---|---|
static EvaluatingNormalizer |
functionOnlyNormalizer(Functions functions,
ReplaceMode replaceMode) |
java.util.List<Symbol> |
normalize(java.util.List<Symbol> symbols,
TransactionContext context)
Normalizes all symbols of a List.
|
Symbol |
normalize(Symbol symbol,
TransactionContext context) |
void |
normalizeInplace(java.util.List<Symbol> symbols,
TransactionContext context)
Normalizes all symbols of a List in place
|
public EvaluatingNormalizer(Functions functions, RowGranularity granularity, ReplaceMode replaceMode, @Nullable ReferenceResolver<? extends Input<?>> referenceResolver, @Nullable FieldResolver fieldResolver)
functions
- function resolvergranularity
- the maximum row granularity the normalizer should try to normalizereplaceMode
- defines if symbols like functions can be mutated or if they have to be copiedreferenceResolver
- reference resolver which is used to resolve pathsfieldResolver
- optional field resolver to resolve fieldspublic static EvaluatingNormalizer functionOnlyNormalizer(Functions functions, ReplaceMode replaceMode)
public java.util.List<Symbol> normalize(java.util.List<Symbol> symbols, TransactionContext context)
symbols
- the list to be normalizedpublic void normalizeInplace(@Nullable java.util.List<Symbol> symbols, @Nullable TransactionContext context)
symbols
- the list to be normalizedpublic Symbol normalize(@Nullable Symbol symbol, @Nullable TransactionContext context)