Package io.trino.sql.analyzer
Class ExpressionAnalyzer
- java.lang.Object
-
- io.trino.sql.analyzer.ExpressionAnalyzer
-
public class ExpressionAnalyzer extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExpressionAnalyzer.LabelPrefixedReference
-
Constructor Summary
Constructors Constructor Description ExpressionAnalyzer(Metadata metadata, AccessControl accessControl, BiFunction<Node,CorrelationSupport,io.trino.sql.analyzer.StatementAnalyzer> statementAnalyzerFactory, Session session, TypeProvider symbolTypes, Map<NodeRef<Parameter>,Expression> parameters, WarningCollector warningCollector, boolean isDescribe, Function<Expression,Type> getPreanalyzedType, Function<Node,Analysis.ResolvedWindow> getResolvedWindow)
-
Method Summary
-
-
-
Constructor Detail
-
ExpressionAnalyzer
public ExpressionAnalyzer(Metadata metadata, AccessControl accessControl, BiFunction<Node,CorrelationSupport,io.trino.sql.analyzer.StatementAnalyzer> statementAnalyzerFactory, Session session, TypeProvider symbolTypes, Map<NodeRef<Parameter>,Expression> parameters, WarningCollector warningCollector, boolean isDescribe, Function<Expression,Type> getPreanalyzedType, Function<Node,Analysis.ResolvedWindow> getResolvedWindow)
-
-
Method Detail
-
getResolvedFunctions
public Map<NodeRef<FunctionCall>,ResolvedFunction> getResolvedFunctions()
-
getExpressionTypes
public Map<NodeRef<Expression>,Type> getExpressionTypes()
-
setExpressionType
public Type setExpressionType(Expression expression, Type type)
-
getExpressionCoercions
public Map<NodeRef<Expression>,Type> getExpressionCoercions()
-
getTypeOnlyCoercions
public Set<NodeRef<Expression>> getTypeOnlyCoercions()
-
getSortKeyCoercionsForFrameBoundCalculation
public Map<NodeRef<Expression>,Type> getSortKeyCoercionsForFrameBoundCalculation()
-
getSortKeyCoercionsForFrameBoundComparison
public Map<NodeRef<Expression>,Type> getSortKeyCoercionsForFrameBoundComparison()
-
getFrameBoundCalculations
public Map<NodeRef<Expression>,ResolvedFunction> getFrameBoundCalculations()
-
getSubqueryInPredicates
public Set<NodeRef<InPredicate>> getSubqueryInPredicates()
-
getPredicateCoercions
public Map<NodeRef<Expression>,Analysis.PredicateCoercions> getPredicateCoercions()
-
getColumnReferences
public Map<NodeRef<Expression>,ResolvedField> getColumnReferences()
-
getLambdaArgumentReferences
public Map<NodeRef<Identifier>,LambdaArgumentDeclaration> getLambdaArgumentReferences()
-
analyze
public Type analyze(Expression expression, Scope scope)
-
analyze
public Type analyze(Expression expression, Scope scope, CorrelationSupport correlationSupport)
-
getSubqueries
public Set<NodeRef<SubqueryExpression>> getSubqueries()
-
getExistsSubqueries
public Set<NodeRef<ExistsPredicate>> getExistsSubqueries()
-
getQuantifiedComparisons
public Set<NodeRef<QuantifiedComparisonExpression>> getQuantifiedComparisons()
-
getWindowFunctions
public Set<NodeRef<FunctionCall>> getWindowFunctions()
-
getTableColumnReferences
public com.google.common.collect.Multimap<QualifiedObjectName,String> getTableColumnReferences()
-
getReferencedFields
public com.google.common.collect.Multimap<NodeRef<Node>,Field> getReferencedFields()
-
getLabelDereferences
public Map<NodeRef<DereferenceExpression>,ExpressionAnalyzer.LabelPrefixedReference> getLabelDereferences()
-
getPatternRecognitionFunctions
public Set<NodeRef<FunctionCall>> getPatternRecognitionFunctions()
-
getRanges
public Map<NodeRef<RangeQuantifier>,Analysis.Range> getRanges()
-
getUndefinedLabels
public Map<NodeRef<RowPattern>,Set<String>> getUndefinedLabels()
-
getMeasureDefinitions
public Map<NodeRef<WindowOperation>,MeasureDefinition> getMeasureDefinitions()
-
getPatternAggregations
public Set<NodeRef<FunctionCall>> getPatternAggregations()
-
isPatternRecognitionFunction
public static boolean isPatternRecognitionFunction(FunctionCall node)
-
analyzePatternRecognitionExpression
public static ExpressionAnalysis analyzePatternRecognitionExpression(Session session, Metadata metadata, GroupProvider groupProvider, AccessControl accessControl, SqlParser sqlParser, Scope scope, Analysis analysis, Expression expression, WarningCollector warningCollector, Set<String> labels)
-
analyzeExpressions
public static ExpressionAnalysis analyzeExpressions(Session session, Metadata metadata, GroupProvider groupProvider, AccessControl accessControl, SqlParser sqlParser, TypeProvider types, Iterable<Expression> expressions, Map<NodeRef<Parameter>,Expression> parameters, WarningCollector warningCollector, QueryType queryType)
-
analyzeExpression
public static ExpressionAnalysis analyzeExpression(Session session, Metadata metadata, GroupProvider groupProvider, AccessControl accessControl, SqlParser sqlParser, Scope scope, Analysis analysis, Expression expression, WarningCollector warningCollector, CorrelationSupport correlationSupport)
-
analyzeWindow
public static ExpressionAnalysis analyzeWindow(Session session, Metadata metadata, GroupProvider groupProvider, AccessControl accessControl, SqlParser sqlParser, Scope scope, Analysis analysis, WarningCollector warningCollector, CorrelationSupport correlationSupport, Analysis.ResolvedWindow window, Node originalNode)
-
create
public static ExpressionAnalyzer create(Analysis analysis, Session session, Metadata metadata, SqlParser sqlParser, GroupProvider groupProvider, AccessControl accessControl, TypeProvider types, WarningCollector warningCollector)
-
createConstantAnalyzer
public static ExpressionAnalyzer createConstantAnalyzer(Metadata metadata, AccessControl accessControl, Session session, Map<NodeRef<Parameter>,Expression> parameters, WarningCollector warningCollector)
-
createConstantAnalyzer
public static ExpressionAnalyzer createConstantAnalyzer(Metadata metadata, AccessControl accessControl, Session session, Map<NodeRef<Parameter>,Expression> parameters, WarningCollector warningCollector, boolean isDescribe)
-
createWithoutSubqueries
public static ExpressionAnalyzer createWithoutSubqueries(Metadata metadata, AccessControl accessControl, Session session, Map<NodeRef<Parameter>,Expression> parameters, ErrorCodeSupplier errorCode, String message, WarningCollector warningCollector, boolean isDescribe)
-
createWithoutSubqueries
public static ExpressionAnalyzer createWithoutSubqueries(Metadata metadata, AccessControl accessControl, Session session, TypeProvider symbolTypes, Map<NodeRef<Parameter>,Expression> parameters, Function<? super Node,? extends RuntimeException> statementAnalyzerRejection, WarningCollector warningCollector, boolean isDescribe)
-
isNumericType
public static boolean isNumericType(Type type)
-
-