Package io.trino.sql.planner
Class TypeAnalyzer
- java.lang.Object
-
- io.trino.sql.planner.TypeAnalyzer
-
public class TypeAnalyzer extends Object
This class is to facilitate obtaining the type of an expression and its subexpressions during planning (i.e., when interacting with IR expression). It will eventually get removed when we split the AST from the IR and we encode the type directly into IR expressions.
-
-
Constructor Summary
Constructors Constructor Description TypeAnalyzer(PlannerContext plannerContext, StatementAnalyzerFactory statementAnalyzerFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TypeAnalyzercreateTestingTypeAnalyzer(PlannerContext plannerContext)TypegetType(Session session, TypeProvider inputTypes, Expression expression)Map<NodeRef<Expression>,Type>getTypes(Session session, TypeProvider inputTypes, Expression expression)Map<NodeRef<Expression>,Type>getTypes(Session session, TypeProvider inputTypes, Iterable<Expression> expressions)
-
-
-
Constructor Detail
-
TypeAnalyzer
@Inject public TypeAnalyzer(PlannerContext plannerContext, StatementAnalyzerFactory statementAnalyzerFactory)
-
-
Method Detail
-
getTypes
public Map<NodeRef<Expression>,Type> getTypes(Session session, TypeProvider inputTypes, Iterable<Expression> expressions)
-
getTypes
public Map<NodeRef<Expression>,Type> getTypes(Session session, TypeProvider inputTypes, Expression expression)
-
getType
public Type getType(Session session, TypeProvider inputTypes, Expression expression)
-
createTestingTypeAnalyzer
public static TypeAnalyzer createTestingTypeAnalyzer(PlannerContext plannerContext)
-
-