@Internal public class ExpressionResolver extends Object
UnresolvedReferenceExpression
or
calls such as BuiltInFunctionDefinitions.OVER
.
The default set of rules (getAllResolverRules()
) will resolve
following references:
BuiltInFunctionDefinitions.FLATTEN
, BuiltInFunctionDefinitions.WITH_COLUMNS
, etc.
Modifier and Type | Class and Description |
---|---|
static class |
ExpressionResolver.ExpressionResolverBuilder
Builder for creating
ExpressionResolver . |
class |
ExpressionResolver.PostResolverFactory
Factory for creating resolved expressions after the actual resolution has happened.
|
Modifier and Type | Method and Description |
---|---|
static List<ResolverRule> |
getAllResolverRules()
List of rules that will be applied during expression resolution.
|
static List<ResolverRule> |
getExpandingResolverRules()
List of rules for (possibly) expanding the list of unresolved expressions.
|
ExpressionResolver.PostResolverFactory |
postResolverFactory()
Enables the creation of resolved expressions for transformations after the actual resolution.
|
List<ResolvedExpression> |
resolve(List<Expression> expressions)
Resolves given expressions with configured set of rules.
|
List<Expression> |
resolveExpanding(List<Expression> expressions)
Resolves given expressions with configured set of rules.
|
static ExpressionResolver.ExpressionResolverBuilder |
resolverFor(TableConfig tableConfig,
ClassLoader userClassLoader,
TableReferenceLookup tableCatalog,
FunctionLookup functionLookup,
DataTypeFactory typeFactory,
SqlExpressionResolver sqlExpressionResolver,
QueryOperation... inputs)
Creates a builder for
ExpressionResolver . |
public static List<ResolverRule> getExpandingResolverRules()
public static List<ResolverRule> getAllResolverRules()
public static ExpressionResolver.ExpressionResolverBuilder resolverFor(TableConfig tableConfig, ClassLoader userClassLoader, TableReferenceLookup tableCatalog, FunctionLookup functionLookup, DataTypeFactory typeFactory, SqlExpressionResolver sqlExpressionResolver, QueryOperation... inputs)
ExpressionResolver
. One can add additional properties to the
resolver like e.g. GroupWindow
or OverWindow
. You can also add additional
ResolverRule
.tableConfig
- general configurationtableCatalog
- a way to lookup a table reference by namefunctionLookup
- a way to lookup call by nametypeFactory
- a way to lookup and create data typesinputs
- inputs to use for field resolutionpublic List<ResolvedExpression> resolve(List<Expression> expressions)
After this method is applied the returned expressions should be ready to be converted to planner specific expressions.
expressions
- list of expressions to resolve.public List<Expression> resolveExpanding(List<Expression> expressions)
After this method is applied the returned expressions might contain unresolved expression that can be used for further API transformations.
expressions
- list of expressions to resolve.public ExpressionResolver.PostResolverFactory postResolverFactory()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.