Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Member Functions | |
BoolLiteral (boolean value) | |
BoolLiteral (String value) throws AnalysisException | |
String | debugString () |
boolean | equals (Object obj) |
boolean | getValue () |
String | toSqlImpl () |
String | getStringValue () |
int | compareTo (LiteralExpr o) |
Expr | clone () |
void | swapSign () throws NotImplementedException |
ExprId | getId () |
Type | getType () |
double | getSelectivity () |
long | getNumDistinctValues () |
void | setPrintSqlInParens (boolean b) |
boolean | isWhereClauseConjunct () |
void | setIsWhereClauseConjunct () |
boolean | isAuxExpr () |
boolean | isRegisteredPredicate () |
void | setIsAuxExpr () |
Function | getFn () |
void | analyze (Analyzer analyzer) throws AnalysisException |
void | analyzeNoThrow (Analyzer analyzer) |
void | castChildCharsToStrings (Analyzer analyzer) throws AnalysisException |
String | toSql () |
TExpr | treeToThrift () |
boolean | isAggregate () |
List< String > | childrenToSql () |
int | hashCode () |
List< Expr > | getConjuncts () |
Expr | trySubstitute (ExprSubstitutionMap smap, Analyzer analyzer, boolean preserveRootType) throws AnalysisException |
Expr | substitute (ExprSubstitutionMap smap, Analyzer analyzer, boolean preserveRootType) |
Expr | reset () |
boolean | isBound (TupleId tid) |
boolean | isBound (SlotId slotId) |
boolean | isBoundByTupleIds (List< TupleId > tids) |
boolean | isBoundBySlotIds (List< SlotId > slotIds) |
void | getIds (List< TupleId > tupleIds, List< SlotId > slotIds) |
boolean | isLiteral () |
boolean | isConstant () |
boolean | isNullLiteral () |
boolean | isScalarSubquery () |
void | checkReturnsBool (String name, boolean printExpr) throws AnalysisException |
final Expr | castTo (Type targetType) throws AnalysisException |
void | castChild (Type targetType, int childIndex) throws AnalysisException |
Expr | ignoreImplicitCast () |
boolean | isImplicitCast () |
String | toString () |
SlotRef | unwrapSlotRef (boolean implicitOnly) |
Expr | negate () |
Subquery | getSubquery () |
void | foldConstantChildren (Analyzer analyzer) throws AnalysisException |
Static Public Member Functions | |
static LiteralExpr | create (String value, Type type) throws AnalysisException |
static LiteralExpr | create (Expr constExpr, TQueryCtx queryCtx) throws AnalysisException |
static LiteralExpr | fromThrift (TExprNode exprNode, Type colType) |
static long | getNumDistinctValues (List< Expr > exprs) |
static void | analyze (List<?extends Expr > exprs, Analyzer analyzer) throws AnalysisException |
static String | toSql (List<?extends Expr > exprs) |
static List< TExpr > | treesToThrift (List<?extends Expr > exprs) |
static com.google.common.base.Predicate < Expr > | isAggregatePredicate () |
static String | debugString (List<?extends Expr > exprs) |
static< CextendsExpr > boolean | equalLists (List< C > l1, List< C > l2) |
static< CextendsExpr > boolean | equalSets (List< C > l1, List< C > l2) |
static< CextendsExpr > boolean | isSubset (List< C > l1, List< C > l2) |
static< CextendsExpr > List< C > | intersect (List< C > l1, List< C > l2) |
static void | intersect (Analyzer analyzer, List< Expr > l1, List< Expr > l2, ExprSubstitutionMap smap, List< Expr > i1, List< Expr > i2) |
static ArrayList< Expr > | trySubstituteList (Iterable<?extends Expr > exprs, ExprSubstitutionMap smap, Analyzer analyzer, boolean preserveRootTypes) throws AnalysisException |
static ArrayList< Expr > | substituteList (Iterable<?extends Expr > exprs, ExprSubstitutionMap smap, Analyzer analyzer, boolean preserveRootTypes) |
static ArrayList< Expr > | resetList (ArrayList< Expr > l) |
static< CextendsExpr > ArrayList< C > | cloneList (Iterable< C > l) |
static< CextendsExpr > void | removeDuplicates (List< C > l) |
static< CextendsExpr > void | removeConstants (List< C > l) |
static boolean | isBound (List<?extends Expr > exprs, List< TupleId > tids) |
static< CextendsExpr > void | getIds (List<?extends Expr > exprs, List< TupleId > tupleIds, List< SlotId > slotIds) |
static Expr | pushNegationToOperands (Expr root) |
Static Public Attributes | |
static final int | EXPR_CHILDREN_LIMIT = 10000 |
static final int | EXPR_DEPTH_LIMIT = 1000 |
static final com.google.common.base.Predicate < Expr > | IS_NOT_PREDICATE |
static final com.google.common.base.Predicate < Expr > | IS_OR_PREDICATE |
static final com.google.common.base.Predicate < Expr > | IS_SCALAR_SUBQUERY |
static final com.google.common.base.Predicate < Expr > | NON_NULL_EMPTY_AGG |
static final com.google.common.base.Predicate < Expr > | IS_BUILTIN_AGG_FN |
static final com.google.common.base.Predicate < Expr > | IS_TRUE_LITERAL |
Protected Member Functions | |
BoolLiteral (BoolLiteral other) | |
void | toThrift (TExprNode msg) |
Expr | uncheckedCastTo (Type targetType) throws AnalysisException |
void | setId (ExprId id) |
void | computeNumDistinctValues () |
Type[] | collectChildReturnTypes () |
Function | getBuiltinFunction (Analyzer analyzer, String name, Type[] argTypes, CompareMode mode) throws AnalysisException |
void | castForFunctionCall (boolean ignoreWildcardDecimals) throws AnalysisException |
void | convertNumericLiteralsFromDecimal (Analyzer analyzer) throws AnalysisException |
void | treeToThriftHelper (TExpr container) |
Expr | substituteImpl (ExprSubstitutionMap smap, Analyzer analyzer) throws AnalysisException |
void | resetAnalysisState () |
void | getIdsHelper (Set< TupleId > tupleIds, Set< SlotId > slotIds) |
void | uncheckedCastChild (Type targetType, int childIndex) throws AnalysisException |
Protected Attributes | |
ExprId | id_ |
Type | type_ |
boolean | isAnalyzed_ |
boolean | isWhereClauseConjunct_ |
boolean | printSqlInParens_ = false |
double | selectivity_ |
long | numDistinctValues_ |
Function | fn_ |
Static Protected Attributes | |
static double | DEFAULT_SELECTIVITY = 0.1 |
Package Functions | |
Type | getResolvedWildCardType () throws AnalysisException |
Private Attributes | |
final boolean | value_ |
Definition at line 24 of file BoolLiteral.java.
|
inline |
Definition at line 27 of file BoolLiteral.java.
References com.cloudera.impala.catalog.Type.BOOLEAN, and com.cloudera.impala.analysis.Expr.type_.
Referenced by com.cloudera.impala.analysis.BoolLiteral.clone(), and com.cloudera.impala.analysis.BoolLiteral.compareTo().
|
inline |
Definition at line 32 of file BoolLiteral.java.
References com.cloudera.impala.catalog.Type.BOOLEAN, and com.cloudera.impala.analysis.Expr.type_.
|
inlineprotected |
Copy c'tor used in clone.
Definition at line 46 of file BoolLiteral.java.
References com.cloudera.impala.analysis.BoolLiteral.value_.
|
inlineinherited |
Perform semantic analysis of node and all of its children. Throws exception if any errors found.
Implements com.cloudera.impala.analysis.ParseNode.
Definition at line 204 of file Expr.java.
References com.cloudera.impala.analysis.Expr.computeNumDistinctValues(), com.cloudera.impala.analysis.Expr.EXPR_CHILDREN_LIMIT, com.cloudera.impala.analysis.Expr.EXPR_DEPTH_LIMIT, com.cloudera.impala.analysis.Expr.isAnalyzed_, and com.cloudera.impala.analysis.Expr.toSql().
Referenced by com.cloudera.impala.analysis.Expr.analyzeNoThrow(), and com.cloudera.impala.analysis.Expr.castChildCharsToStrings().
|
inlinestaticinherited |
|
inlineinherited |
Helper function to analyze this expr and assert that the analysis was successful. TODO: This function could be used in many more places to clean up. Consider adding an IAnalyzable interface or similar to and move this helper into Analyzer such that non-Expr things can use the helper also.
Definition at line 238 of file Expr.java.
References com.cloudera.impala.analysis.Expr.analyze().
|
inlineinherited |
Add a cast expression above child. If child is a literal expression, we attempt to convert the value of the child directly, and not insert a cast node.
targetType | type to be cast to |
childIndex | index of child to be cast |
Definition at line 1008 of file Expr.java.
Referenced by com.cloudera.impala.analysis.CaseExpr.analyze(), and com.cloudera.impala.analysis.Expr.castForFunctionCall().
|
inlineinherited |
Casts any child which is CHAR to a STRING.
Definition at line 277 of file Expr.java.
References com.cloudera.impala.analysis.Expr.analyze(), com.cloudera.impala.analysis.Expr.castTo(), com.cloudera.impala.catalog.PrimitiveType.CHAR, and com.cloudera.impala.catalog.Type.STRING.
Referenced by com.cloudera.impala.analysis.CaseExpr.analyze().
|
inlineprotectedinherited |
Generates the necessary casts for the children of this expr to call fn_. child(0) is cast to the function's first argument, child(1) to the second etc. This does not do any validation and the casts are assumed to be safe.
If ignoreWildcardDecimals is true, the function will not cast arguments that are wildcard decimals. This is used for builtins where the cast is done within the BE function. Otherwise, if the function signature contains wildcard decimals, each wildcard child argument will be cast to the highest resolution that can contain all of the child wildcard arguments. e.g. fn(decimal(*), decimal(*)) called with fn(decimal(10,2), decimal(5,3)) both children will be cast to (11, 3).
Definition at line 312 of file Expr.java.
References com.cloudera.impala.analysis.Expr.castChild(), com.cloudera.impala.analysis.Expr.fn_, and com.cloudera.impala.analysis.Expr.getResolvedWildCardType().
Referenced by com.cloudera.impala.analysis.LikePredicate.analyze(), com.cloudera.impala.analysis.InPredicate.analyze(), com.cloudera.impala.analysis.TimestampArithmeticExpr.analyze(), com.cloudera.impala.analysis.CompoundPredicate.analyze(), com.cloudera.impala.analysis.ArithmeticExpr.analyze(), com.cloudera.impala.analysis.BinaryPredicate.analyze(), and com.cloudera.impala.analysis.FunctionCallExpr.analyze().
|
inlineinherited |
Casts this expr to a specific target type. It checks the validity of the cast and calls uncheckedCastTo().
targetType | type to be cast to |
AnalysisException | when an invalid cast is asked for, for example, failure to convert a string literal to a date literal |
Definition at line 967 of file Expr.java.
References com.cloudera.impala.analysis.Expr.type_, and com.cloudera.impala.analysis.Expr.uncheckedCastTo().
Referenced by com.cloudera.impala.analysis.Expr.castChildCharsToStrings().
|
inlineinherited |
Checks whether this expr returns a boolean type or NULL type. If not, throws an AnalysisException with an appropriate error message using 'name' as a prefix. For example, 'name' could be "WHERE clause". The error message only contains this.toSql() if printExpr is true.
Definition at line 947 of file Expr.java.
References com.cloudera.impala.catalog.Type.isBoolean(), impala.name, com.cloudera.impala.analysis.Expr.toSql(), and com.cloudera.impala.analysis.Expr.type_.
|
inlineinherited |
Definition at line 531 of file Expr.java.
Referenced by com.cloudera.impala.analysis.FunctionCallExpr.toSqlImpl().
|
inline |
Definition at line 104 of file BoolLiteral.java.
References com.cloudera.impala.analysis.BoolLiteral.BoolLiteral().
|
inlinestaticinherited |
Create a deep copy of 'l'. The elements of the returned list are of the same type as the input list.
Definition at line 798 of file Expr.java.
Referenced by com.cloudera.impala.planner.DistributedPlanner.createHashJoinFragment().
|
inlineprotectedinherited |
Collects the returns types of the child nodes in an array.
Definition at line 266 of file Expr.java.
References com.cloudera.impala.analysis.Expr.type_.
Referenced by com.cloudera.impala.analysis.IsNullPredicate.analyze(), com.cloudera.impala.analysis.LikePredicate.analyze(), com.cloudera.impala.analysis.TimestampArithmeticExpr.analyze(), com.cloudera.impala.analysis.CompoundPredicate.analyze(), com.cloudera.impala.analysis.ArithmeticExpr.analyze(), com.cloudera.impala.analysis.BinaryPredicate.analyze(), and com.cloudera.impala.analysis.FunctionCallExpr.analyze().
|
inline |
Definition at line 94 of file BoolLiteral.java.
References com.cloudera.impala.analysis.BoolLiteral.BoolLiteral(), com.cloudera.impala.analysis.BoolLiteral.getValue(), and com.cloudera.impala.analysis.BoolLiteral.value_.
|
inlineprotectedinherited |
Definition at line 246 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isConstant(), and com.cloudera.impala.analysis.Expr.numDistinctValues_.
Referenced by com.cloudera.impala.analysis.Expr.analyze(), and com.cloudera.impala.analysis.CastExpr.CastExpr().
|
inlineprotectedinherited |
Converts numeric literal in the expr tree rooted at this expr to return floating point types instead of decimals, if possible.
Decimal has a higher processing cost than floating point and we should not pay the cost if the user does not require the accuracy. For example: "select float_col + 1.1" would start out with 1.1 as a decimal(2,1) and the float_col would be promoted to a high accuracy decimal. This function will identify this case and treat 1.1 as a float. In the case of "decimal_col + 1.1", 1.1 would remain a decimal. In the case of "float_col + cast(1.1 as decimal(2,1))", the result would be a decimal.
Another way to think about it is that DecimalLiterals are analyzed as returning decimals (of the narrowest precision/scale) and we later convert them to a floating point type when it is consistent with the user's intent.
TODO: another option is to do constant folding in the FE and then apply this rule.
Definition at line 413 of file Expr.java.
References com.cloudera.impala.analysis.Expr.convertNumericLiteralsToFloat(), com.cloudera.impala.catalog.Type.isDecimal(), and com.cloudera.impala.analysis.Expr.isExplicitCastToDecimal().
Referenced by com.cloudera.impala.analysis.ArithmeticExpr.analyze(), and com.cloudera.impala.analysis.BinaryPredicate.analyze().
|
inlinestaticinherited |
Returns an analyzed literal of 'type'.
Definition at line 51 of file LiteralExpr.java.
Referenced by com.cloudera.impala.analysis.FunctionCallExpr.resolveDecimalReturnType().
|
inlinestaticinherited |
Evaluates the given constant expr and returns its result as a LiteralExpr. Assumes expr has been analyzed. Returns constExpr if is it already a LiteralExpr. TODO: Support non-scalar types.
Definition at line 153 of file LiteralExpr.java.
References com.cloudera.impala.analysis.Expr.toSql().
|
inline |
Definition at line 52 of file BoolLiteral.java.
References com.cloudera.impala.analysis.BoolLiteral.value_.
|
inlinestaticinherited |
|
inlinestaticinherited |
Return true if l1[i].equals(l2[i]) for all i.
Definition at line 584 of file Expr.java.
Referenced by com.cloudera.impala.analysis.AggregateInfo.createDistinctAggInfo().
|
inline |
Definition at line 59 of file BoolLiteral.java.
References com.cloudera.impala.analysis.BoolLiteral.value_.
|
inlinestaticinherited |
Return true if l1 equals l2 when both lists are interpreted as sets. TODO: come up with something better than O(n^2)?
Definition at line 598 of file Expr.java.
Referenced by com.cloudera.impala.planner.AnalyticPlanner.WindowGroup.isCompatible(), and com.cloudera.impala.planner.AnalyticPlanner.SortGroup.isPrefixOf().
|
inlineinherited |
Evaluate in the BE the children of 'this' that are constant expressions and substitute them with the evaluation result as LiteralExprs. Modifies 'this' in place and does not re-analyze it. Hence, it is not safe to evaluate the modified expr in the BE as the resolved fn_ may be incorrect given the new arguments.
Throws an AnalysisException if the evaluation fails in the BE.
TODO: Used only during partition pruning. Convert it to a generic constant expression folding function to be used during the analysis.
Definition at line 1134 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isAnalyzed_, and com.cloudera.impala.analysis.Expr.isLiteral().
|
inlinestaticinherited |
Returns an analyzed literal from the thrift object.
Definition at line 94 of file LiteralExpr.java.
|
inlineprotectedinherited |
Looks up in the catalog the builtin for 'name' and 'argTypes'. Returns null if the function is not found.
Definition at line 290 of file Expr.java.
References com.cloudera.impala.catalog.Catalog.BUILTINS_DB, com.cloudera.impala.catalog.Type.INVALID, and impala.name.
Referenced by com.cloudera.impala.analysis.IsNullPredicate.analyze(), com.cloudera.impala.analysis.LikePredicate.analyze(), com.cloudera.impala.analysis.InPredicate.analyze(), com.cloudera.impala.analysis.TimestampArithmeticExpr.analyze(), com.cloudera.impala.analysis.CompoundPredicate.analyze(), com.cloudera.impala.analysis.ArithmeticExpr.analyze(), com.cloudera.impala.analysis.BinaryPredicate.analyze(), and com.cloudera.impala.analysis.CaseExpr.analyze().
|
inlineinherited |
Gather conjuncts from this expr and return them in a list. A conjunct is an expr that returns a boolean, e.g., Predicates, function calls, SlotRefs, etc. Hence, this method is placed here and not in Predicate.
Definition at line 662 of file Expr.java.
Referenced by com.cloudera.impala.analysis.TableRef.analyzeJoin(), com.cloudera.impala.analysis.StmtRewriter.canEliminate(), com.cloudera.impala.analysis.StmtRewriter.mergeExpr(), com.cloudera.impala.analysis.Analyzer.registerConjuncts(), com.cloudera.impala.analysis.Analyzer.registerOnClauseConjuncts(), and com.cloudera.impala.analysis.StmtRewriter.rewriteWhereClauseSubqueries().
|
inlineinherited |
Definition at line 197 of file Expr.java.
References com.cloudera.impala.analysis.Expr.fn_.
Referenced by com.cloudera.impala.analysis.AnalyticExpr.checkOffset(), com.cloudera.impala.analysis.AnalyticExpr.getOffsetExpr(), and com.cloudera.impala.analysis.AnalyticExpr.standardize().
|
inlineinherited |
Definition at line 186 of file Expr.java.
References com.cloudera.impala.analysis.Expr.id_.
Referenced by com.cloudera.impala.analysis.Analyzer.canEvalPredicate(), com.cloudera.impala.analysis.Analyzer.getBoundPredicates(), com.cloudera.impala.analysis.SlotRef.getIdsHelper(), com.cloudera.impala.analysis.Analyzer.registerConjunct(), com.cloudera.impala.analysis.SlotRef.toString(), and com.cloudera.impala.analysis.SlotRef.toThrift().
|
inlineinherited |
Definition at line 883 of file Expr.java.
References com.cloudera.impala.analysis.Expr.getIdsHelper().
|
inlineprotectedinherited |
Definition at line 891 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Expr.getIds().
|
inlineinherited |
Definition at line 190 of file Expr.java.
References com.cloudera.impala.analysis.Expr.numDistinctValues_.
Referenced by com.cloudera.impala.analysis.SlotRef.analyze(), com.cloudera.impala.analysis.BinaryPredicate.analyze(), and com.cloudera.impala.analysis.SlotRef.SlotRef().
|
inlinestaticinherited |
|
inlinepackageinherited |
Returns the max resolution type of all the wild card decimal types. Returns null if there are no wild card types.
Definition at line 336 of file Expr.java.
References com.cloudera.impala.catalog.Type.isNull(), com.cloudera.impala.catalog.Type.isWildcardDecimal(), and com.cloudera.impala.analysis.Expr.type_.
Referenced by com.cloudera.impala.analysis.Expr.castForFunctionCall().
|
inlineinherited |
Definition at line 189 of file Expr.java.
References com.cloudera.impala.analysis.Expr.selectivity_.
|
inline |
Definition at line 74 of file BoolLiteral.java.
References com.cloudera.impala.analysis.BoolLiteral.value_.
Referenced by com.cloudera.impala.analysis.BoolLiteral.toSqlImpl().
|
inlineinherited |
|
inlineinherited |
Definition at line 188 of file Expr.java.
References com.cloudera.impala.analysis.Expr.type_.
Referenced by com.cloudera.impala.analysis.Subquery.analyze(), com.cloudera.impala.analysis.IsNullPredicate.analyze(), com.cloudera.impala.analysis.LimitElement.analyze(), com.cloudera.impala.analysis.InPredicate.analyze(), com.cloudera.impala.analysis.TimestampArithmeticExpr.analyze(), com.cloudera.impala.analysis.BinaryPredicate.analyze(), com.cloudera.impala.analysis.CastExpr.analyze(), com.cloudera.impala.analysis.CaseExpr.analyze(), com.cloudera.impala.analysis.AnalyticExpr.analyze(), com.cloudera.impala.analysis.FunctionCallExpr.analyze(), com.cloudera.impala.analysis.AnalyzeExprsTest.checkCasts(), com.cloudera.impala.analysis.AnalyticInfo.checkConsistency(), com.cloudera.impala.analysis.AggregateInfo.checkConsistency(), com.cloudera.impala.analysis.AnalyticWindow.checkOffsetBoundaries(), com.cloudera.impala.analysis.AnalyticExpr.checkRangeOffsetBoundaryExpr(), com.cloudera.impala.analysis.Subquery.createStructTypeFromExprList(), com.cloudera.impala.analysis.InlineViewRef.createTupleDescriptor(), com.cloudera.impala.catalog.ColumnStats.fromExpr(), com.cloudera.impala.planner.DataSourceScanNode.getDisjunctsHelper(), com.cloudera.impala.analysis.Expr.isExplicitCastToDecimal(), com.cloudera.impala.analysis.Expr.isScalarSubquery(), com.cloudera.impala.planner.DataSourceScanNode.literalToColumnValue(), com.cloudera.impala.analysis.Subquery.returnsScalarColumn(), com.cloudera.impala.analysis.QueryStmt.substituteOrdinals(), com.cloudera.impala.analysis.Expr.trySubstitute(), and com.cloudera.impala.analysis.AnalyzeExprsTest.typeCastTest().
|
inline |
Definition at line 66 of file BoolLiteral.java.
References com.cloudera.impala.analysis.BoolLiteral.value_.
Referenced by com.cloudera.impala.analysis.BoolLiteral.compareTo().
|
inlineinherited |
Definition at line 649 of file Expr.java.
References com.cloudera.impala.analysis.Expr.id_.
|
inlineinherited |
Returns child expr if this expr is an implicit cast, otherwise returns 'this'.
Definition at line 1034 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isImplicitCast().
|
inlinestaticinherited |
|
inlinestaticinherited |
Compute the intersection of l1 and l2, given the smap, and return the intersecting l1 elements in i1 and the intersecting l2 elements in i2.
Definition at line 626 of file Expr.java.
References com.cloudera.impala.analysis.Expr.equals().
|
inlineinherited |
|
inlinestaticinherited |
Definition at line 523 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isAggregatePredicate_.
Referenced by com.cloudera.impala.analysis.SelectStmt.analyze(), com.cloudera.impala.analysis.FunctionCallExpr.analyze(), com.cloudera.impala.analysis.SelectStmt.analyzeAggregation(), and com.cloudera.impala.analysis.TableRef.analyzeJoin().
|
inlineinherited |
Definition at line 194 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isAuxExpr_.
Referenced by com.cloudera.impala.analysis.Analyzer.hasUnassignedConjuncts().
|
inlineinherited |
Returns true if expr is fully bound by tid, otherwise false.
Definition at line 845 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isBoundByTupleIds().
Referenced by com.cloudera.impala.analysis.SelectStmt.analyzeAggregation().
|
inlineinherited |
Returns true if expr is fully bound by slotId, otherwise false.
Definition at line 862 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isBoundBySlotIds().
|
inlineinherited |
Returns true if expr is fully bound by slotIds, otherwise false.
Definition at line 869 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Expr.isBound(), and com.cloudera.impala.planner.HdfsScanNode.prunePartitions().
|
inlineinherited |
Returns true if expr is fully bound by tids, otherwise false.
Definition at line 852 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Analyzer.canEvalPredicate(), com.cloudera.impala.planner.AnalyticPlanner.createSortInfo(), com.cloudera.impala.analysis.Expr.isBound(), and com.cloudera.impala.analysis.StmtRewriter.mergeExpr().
|
inlineinherited |
Definition at line 917 of file Expr.java.
Referenced by com.cloudera.impala.analysis.PartitionKeyValue.analyze(), com.cloudera.impala.analysis.LimitElement.analyze(), com.cloudera.impala.analysis.Expr.computeNumDistinctValues(), com.cloudera.impala.planner.SingleNodePlanner.createHBaseValueRange(), com.cloudera.impala.analysis.AggregateInfoBase.createTupleDesc(), and com.cloudera.impala.analysis.Analyzer.markConstantConjunct().
|
inlineinherited |
Returns true if 'this' is an implicit cast expr.
Definition at line 1042 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Expr.ignoreImplicitCast(), com.cloudera.impala.analysis.Expr.reset(), and com.cloudera.impala.analysis.Expr.substituteImpl().
|
inlineinherited |
Definition at line 908 of file Expr.java.
Referenced by com.cloudera.impala.planner.HdfsScanNode.canEvalUsingPartitionMd(), com.cloudera.impala.analysis.CaseExpr.CaseExpr(), and com.cloudera.impala.analysis.Expr.foldConstantChildren().
|
inlineinherited |
Definition at line 926 of file Expr.java.
Referenced by com.cloudera.impala.analysis.CaseExpr.CaseExpr().
|
inlineinherited |
Definition at line 195 of file Expr.java.
References com.cloudera.impala.analysis.Expr.id_.
Referenced by com.cloudera.impala.planner.SingleNodePlanner.migrateConjunctsToInlineView().
|
inlineinherited |
Return true if this expr is a scalar subquery.
Definition at line 936 of file Expr.java.
References com.cloudera.impala.analysis.Expr.getType(), and com.cloudera.impala.analysis.Expr.isAnalyzed_.
Referenced by com.cloudera.impala.analysis.StmtRewriter.createJoinConjunct().
|
inlinestaticinherited |
Return true if l1 is a subset of l2.
Definition at line 606 of file Expr.java.
Referenced by com.cloudera.impala.planner.DistributedPlanner.createInsertFragment().
|
inlineinherited |
Definition at line 192 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isWhereClauseConjunct_.
Referenced by com.cloudera.impala.analysis.Analyzer.canEvalPredicate(), and com.cloudera.impala.analysis.Analyzer.evalByJoin().
|
inlineinherited |
Negates a boolean Expr.
Definition at line 1102 of file Expr.java.
References com.cloudera.impala.catalog.PrimitiveType.BOOLEAN.
|
inlinestaticinherited |
Pushes negation to the individual operands of a predicate tree rooted at 'root'.
Definition at line 1076 of file Expr.java.
References com.cloudera.impala.analysis.Expr.IS_NOT_PREDICATE, and com.cloudera.impala.analysis.Expr.NEGATE_FN.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
inlineinherited |
Resets the internal analysis state of this expr tree. Removes implicit casts.
Definition at line 771 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isImplicitCast(), and com.cloudera.impala.analysis.Expr.resetAnalysisState().
Referenced by com.cloudera.impala.analysis.Expr.resetList().
|
inlineprotectedinherited |
Resets the internal state of this expr produced by analyze(). Only modifies this expr, and not its child exprs.
Definition at line 766 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isAnalyzed_.
Referenced by com.cloudera.impala.analysis.Expr.reset(), and com.cloudera.impala.analysis.Expr.substituteImpl().
|
inlinestaticinherited |
Definition at line 780 of file Expr.java.
References com.cloudera.impala.analysis.Expr.reset().
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 196 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isAuxExpr_.
|
inlineinherited |
Definition at line 193 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isWhereClauseConjunct_.
|
inlineinherited |
Definition at line 191 of file Expr.java.
References com.cloudera.impala.analysis.Expr.printSqlInParens_.
|
inlineinherited |
Returns an analyzed clone of 'this' with exprs substituted according to smap. Removes implicit casts and analysis state while cloning/substituting exprs within this tree, such that the returned result has minimal implicit casts and types. Expects the analysis of the post-substitution expr to succeed. If smap is null, this function is equivalent to clone(). If preserveRootType is true, the resulting expr tree will be cast if necessary to the type of 'this'.
Definition at line 710 of file Expr.java.
References com.cloudera.impala.analysis.Expr.trySubstitute().
Referenced by com.cloudera.impala.planner.HashJoinNode.init().
|
inlineprotectedinherited |
Recursive method that performs the actual substitution for try/substitute() while removing implicit casts. Resets the analysis state in all non-SlotRef expressions. Exprs that have non-child exprs which should be affected by substitutions must override this method and apply the substitution to such exprs as well.
Definition at line 745 of file Expr.java.
References com.cloudera.impala.analysis.Expr.isImplicitCast(), and com.cloudera.impala.analysis.Expr.resetAnalysisState().
Referenced by com.cloudera.impala.analysis.BetweenPredicate.substituteImpl().
|
inlinestaticinherited |
Definition at line 730 of file Expr.java.
References com.cloudera.impala.analysis.Expr.trySubstituteList().
Referenced by com.cloudera.impala.planner.AnalyticPlanner.createSortGroupPlan(), and com.cloudera.impala.planner.AnalyticPlanner.createSortInfo().
|
inlineinherited |
Definition at line 143 of file LiteralExpr.java.
|
inlineinherited |
Implements com.cloudera.impala.analysis.ParseNode.
Definition at line 449 of file Expr.java.
References com.cloudera.impala.analysis.Expr.printSqlInParens_, and com.cloudera.impala.analysis.Expr.toSqlImpl().
Referenced by com.cloudera.impala.analysis.ExtractFromExpr.analyze(), com.cloudera.impala.analysis.Subquery.analyze(), com.cloudera.impala.analysis.SlotRef.analyze(), com.cloudera.impala.analysis.LimitElement.analyze(), com.cloudera.impala.analysis.LikePredicate.analyze(), com.cloudera.impala.analysis.InPredicate.analyze(), com.cloudera.impala.analysis.TimestampArithmeticExpr.analyze(), com.cloudera.impala.analysis.CompoundPredicate.analyze(), com.cloudera.impala.analysis.ArithmeticExpr.analyze(), com.cloudera.impala.analysis.BinaryPredicate.analyze(), com.cloudera.impala.analysis.NumericLiteral.analyze(), com.cloudera.impala.analysis.Expr.analyze(), com.cloudera.impala.analysis.CastExpr.analyze(), com.cloudera.impala.analysis.CaseExpr.analyze(), com.cloudera.impala.analysis.AnalyticExpr.analyze(), com.cloudera.impala.analysis.FunctionCallExpr.analyze(), com.cloudera.impala.analysis.SelectStmt.analyzeAggregation(), com.cloudera.impala.analysis.AnalyticExpr.checkOffset(), com.cloudera.impala.analysis.AnalyticExpr.checkRangeOffsetBoundaryExpr(), com.cloudera.impala.analysis.Expr.checkReturnsBool(), com.cloudera.impala.analysis.LiteralExpr.create(), com.cloudera.impala.analysis.StmtRewriter.createJoinConjunct(), com.cloudera.impala.analysis.QueryStmt.createSortInfo(), com.cloudera.impala.analysis.ExtractFromExpr.getFunctionNotFoundError(), com.cloudera.impala.analysis.FunctionCallExpr.getFunctionNotFoundError(), com.cloudera.impala.analysis.Analyzer.registerConjunct(), com.cloudera.impala.analysis.QueryStmt.substituteOrdinals(), com.cloudera.impala.analysis.CaseExpr.toCaseSql(), com.cloudera.impala.analysis.TableRef.toSql(), com.cloudera.impala.analysis.BetweenPredicate.toSqlImpl(), and com.cloudera.impala.analysis.AnalyticExpr.toSqlImpl().
|
inlinestaticinherited |
|
inline |
Definition at line 69 of file BoolLiteral.java.
References com.cloudera.impala.analysis.BoolLiteral.getStringValue().
|
inlineinherited |
Definition at line 1047 of file Expr.java.
References com.cloudera.impala.analysis.Expr.id_, com.cloudera.impala.analysis.Expr.numDistinctValues_, com.cloudera.impala.analysis.Expr.selectivity_, and com.cloudera.impala.analysis.Expr.type_.
Referenced by com.cloudera.impala.analysis.ExtractFromExpr.analyze(), com.cloudera.impala.analysis.NullLiteral.debugString(), com.cloudera.impala.analysis.NumericLiteral.debugString(), com.cloudera.impala.analysis.CastExpr.debugString(), com.cloudera.impala.analysis.CastExpr.getFnName(), and com.cloudera.impala.analysis.InPredicate.initBuiltins().
|
inlineprotected |
Definition at line 79 of file BoolLiteral.java.
References com.cloudera.impala.analysis.BoolLiteral.value_.
|
inlinestaticinherited |
Definition at line 515 of file Expr.java.
Referenced by com.cloudera.impala.planner.HdfsTableSink.toThrift(), com.cloudera.impala.planner.SortNode.toThrift(), and com.cloudera.impala.planner.ExchangeNode.toThrift().
|
inlineinherited |
Definition at line 460 of file Expr.java.
References com.cloudera.impala.catalog.Type.BOOLEAN, com.cloudera.impala.catalog.Type.isNull(), com.cloudera.impala.analysis.Expr.treeToThriftHelper(), and com.cloudera.impala.analysis.Expr.type_.
|
inlineprotectedinherited |
Definition at line 474 of file Expr.java.
References com.cloudera.impala.analysis.Expr.fn_, com.cloudera.impala.catalog.Function.getNumArgs(), com.cloudera.impala.catalog.Function.hasVarArgs(), com.cloudera.impala.analysis.Expr.isAnalyzed_, and com.cloudera.impala.analysis.Expr.toThrift().
Referenced by com.cloudera.impala.analysis.Expr.treeToThrift().
|
inlineinherited |
Returns an analyzed clone of 'this' with exprs substituted according to smap. Removes implicit casts and analysis state while cloning/substituting exprs within this tree, such that the returned result has minimal implicit casts and types. Throws if analyzing the post-substitution expr tree failed. If smap is null, this function is equivalent to clone(). If preserveRootType is true, the resulting expr tree will be cast if necessary to the type of 'this'.
Definition at line 689 of file Expr.java.
References com.cloudera.impala.analysis.Expr.clone(), com.cloudera.impala.analysis.Expr.getType(), and com.cloudera.impala.analysis.Expr.type_.
Referenced by com.cloudera.impala.analysis.Expr.substitute().
|
inlinestaticinherited |
Definition at line 719 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Expr.substituteList().
|
inlineprotectedinherited |
Convert child to to targetType, possibly by inserting an implicit cast, or by returning an altogether new expression, or by returning 'this' with a modified return type'.
targetType | type to be cast to |
childIndex | index of child to be cast |
Definition at line 1024 of file Expr.java.
Referenced by com.cloudera.impala.analysis.IsNullPredicate.analyze(), com.cloudera.impala.analysis.InPredicate.analyze(), com.cloudera.impala.analysis.CastExpr.analyze(), and com.cloudera.impala.analysis.FunctionCallExpr.analyze().
|
inlineprotected |
Definition at line 85 of file BoolLiteral.java.
|
inlineinherited |
|
staticprotectedinherited |
Definition at line 63 of file Expr.java.
Referenced by com.cloudera.impala.analysis.BetweenPredicate.analyze(), com.cloudera.impala.analysis.SlotRef.analyze(), com.cloudera.impala.analysis.IsNullPredicate.analyze(), com.cloudera.impala.analysis.InPredicate.analyze(), and com.cloudera.impala.analysis.BinaryPredicate.analyze().
|
staticinherited |
Definition at line 54 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Expr.analyze(), and com.cloudera.impala.analysis.AnalyzeExprsTest.TestExprChildLimit().
|
staticinherited |
Definition at line 56 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Expr.analyze(), com.cloudera.impala.analysis.AnalyzeExprsTest.testFuncExprDepthLimit(), and com.cloudera.impala.analysis.AnalyzeExprsTest.testInfixExprDepthLimit().
|
protectedinherited |
Definition at line 161 of file Expr.java.
Referenced by com.cloudera.impala.analysis.BetweenPredicate.analyze(), com.cloudera.impala.analysis.IsNullPredicate.analyze(), com.cloudera.impala.analysis.LikePredicate.analyze(), com.cloudera.impala.analysis.InPredicate.analyze(), com.cloudera.impala.analysis.TimestampArithmeticExpr.analyze(), com.cloudera.impala.analysis.CompoundPredicate.analyze(), com.cloudera.impala.analysis.ArithmeticExpr.analyze(), com.cloudera.impala.analysis.BinaryPredicate.analyze(), com.cloudera.impala.analysis.CastExpr.analyze(), com.cloudera.impala.analysis.CaseExpr.analyze(), com.cloudera.impala.analysis.FunctionCallExpr.analyze(), com.cloudera.impala.analysis.Expr.castForFunctionCall(), com.cloudera.impala.analysis.Expr.equals(), com.cloudera.impala.analysis.Expr.Expr(), com.cloudera.impala.analysis.Expr.getFn(), com.cloudera.impala.analysis.FunctionCallExpr.getReturnType(), com.cloudera.impala.analysis.FunctionCallExpr.isAggregateFunction(), com.cloudera.impala.analysis.FunctionCallExpr.isConstant(), com.cloudera.impala.analysis.FunctionCallExpr.isScalarFunction(), com.cloudera.impala.analysis.FunctionCallExpr.resetAnalysisState(), com.cloudera.impala.analysis.FunctionCallExpr.returnsNonNullOnEmpty(), and com.cloudera.impala.analysis.Expr.treeToThriftHelper().
|
protectedinherited |
Definition at line 135 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Expr.debugString(), com.cloudera.impala.analysis.Expr.Expr(), com.cloudera.impala.analysis.Expr.getId(), com.cloudera.impala.analysis.Expr.hashCode(), com.cloudera.impala.analysis.Expr.isRegisteredPredicate(), and com.cloudera.impala.analysis.Expr.toString().
|
staticinherited |
Definition at line 115 of file Expr.java.
Referenced by com.cloudera.impala.analysis.StmtRewriter.createJoinConjunct().
|
staticinherited |
Definition at line 75 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Expr.pushNegationToOperands().
|
staticinherited |
Definition at line 85 of file Expr.java.
Referenced by com.cloudera.impala.analysis.StmtRewriter.canExtractCorrelatedPredicates(), and com.cloudera.impala.analysis.StmtRewriter.hasSubqueryInDisjunction().
|
staticinherited |
Definition at line 95 of file Expr.java.
Referenced by com.cloudera.impala.analysis.IsNullPredicate.analyze(), and com.cloudera.impala.analysis.StmtRewriter.rewriteWhereClauseSubqueries().
|
staticinherited |
Definition at line 124 of file Expr.java.
Referenced by com.cloudera.impala.analysis.StmtRewriter.canEliminate().
|
protectedinherited |
Definition at line 143 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Predicate< com.cloudera.impala.analysis.Expr >.analyze(), com.cloudera.impala.analysis.ExistsPredicate.analyze(), com.cloudera.impala.analysis.TupleIsNullPredicate.analyze(), com.cloudera.impala.analysis.ExtractFromExpr.analyze(), com.cloudera.impala.analysis.BetweenPredicate.analyze(), com.cloudera.impala.analysis.Subquery.analyze(), com.cloudera.impala.analysis.SlotRef.analyze(), com.cloudera.impala.analysis.IsNullPredicate.analyze(), com.cloudera.impala.analysis.LikePredicate.analyze(), com.cloudera.impala.analysis.InPredicate.analyze(), com.cloudera.impala.analysis.TimestampArithmeticExpr.analyze(), com.cloudera.impala.analysis.CompoundPredicate.analyze(), com.cloudera.impala.analysis.ArithmeticExpr.analyze(), com.cloudera.impala.analysis.BinaryPredicate.analyze(), com.cloudera.impala.analysis.NumericLiteral.analyze(), com.cloudera.impala.analysis.CastExpr.analyze(), com.cloudera.impala.analysis.Expr.analyze(), com.cloudera.impala.analysis.CaseExpr.analyze(), com.cloudera.impala.analysis.AnalyticExpr.analyze(), com.cloudera.impala.analysis.FunctionCallExpr.analyze(), com.cloudera.impala.analysis.CastExpr.CastExpr(), com.cloudera.impala.analysis.Expr.Expr(), com.cloudera.impala.analysis.Expr.foldConstantChildren(), com.cloudera.impala.analysis.SlotRef.getDesc(), com.cloudera.impala.analysis.SlotRef.getResolvedPath(), com.cloudera.impala.analysis.BetweenPredicate.getRewrittenPredicate(), com.cloudera.impala.analysis.SlotRef.getSlotId(), com.cloudera.impala.analysis.NumericLiteral.init(), com.cloudera.impala.analysis.SlotRef.isBoundBySlotIds(), com.cloudera.impala.analysis.Expr.isScalarSubquery(), com.cloudera.impala.analysis.NumericLiteral.NumericLiteral(), com.cloudera.impala.analysis.FunctionCallExpr.resetAnalysisState(), com.cloudera.impala.analysis.Expr.resetAnalysisState(), com.cloudera.impala.analysis.SlotRef.SlotRef(), com.cloudera.impala.analysis.Subquery.Subquery(), com.cloudera.impala.analysis.Expr.treeToThriftHelper(), and com.cloudera.impala.analysis.NumericLiteral.uncheckedCastTo().
|
protectedinherited |
|
staticinherited |
Definition at line 106 of file Expr.java.
Referenced by com.cloudera.impala.analysis.StmtRewriter.createJoinConjunct(), and com.cloudera.impala.analysis.StmtRewriter.mergeExpr().
|
protectedinherited |
Definition at line 157 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Predicate< com.cloudera.impala.analysis.Expr >.analyze(), com.cloudera.impala.analysis.SlotRef.analyze(), com.cloudera.impala.analysis.Expr.computeNumDistinctValues(), com.cloudera.impala.analysis.Expr.Expr(), com.cloudera.impala.analysis.Expr.getNumDistinctValues(), com.cloudera.impala.analysis.LiteralExpr.LiteralExpr(), com.cloudera.impala.analysis.SlotRef.SlotRef(), and com.cloudera.impala.analysis.Expr.toString().
|
protectedinherited |
Definition at line 148 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Expr.Expr(), com.cloudera.impala.analysis.Expr.setPrintSqlInParens(), and com.cloudera.impala.analysis.Expr.toSql().
|
protectedinherited |
Definition at line 153 of file Expr.java.
Referenced by com.cloudera.impala.analysis.BetweenPredicate.analyze(), com.cloudera.impala.analysis.SlotRef.analyze(), com.cloudera.impala.analysis.IsNullPredicate.analyze(), com.cloudera.impala.analysis.InPredicate.analyze(), com.cloudera.impala.analysis.CompoundPredicate.analyze(), com.cloudera.impala.analysis.BinaryPredicate.analyze(), com.cloudera.impala.analysis.Expr.Expr(), com.cloudera.impala.analysis.Expr.getSelectivity(), com.cloudera.impala.analysis.LikePredicate.LikePredicate(), and com.cloudera.impala.analysis.Expr.toString().
|
protectedinherited |
Definition at line 142 of file Expr.java.
Referenced by com.cloudera.impala.analysis.Predicate< com.cloudera.impala.analysis.Expr >.analyze(), com.cloudera.impala.analysis.Subquery.analyze(), com.cloudera.impala.analysis.SlotRef.analyze(), com.cloudera.impala.analysis.TimestampArithmeticExpr.analyze(), com.cloudera.impala.analysis.ArithmeticExpr.analyze(), com.cloudera.impala.analysis.NumericLiteral.analyze(), com.cloudera.impala.analysis.CastExpr.analyze(), com.cloudera.impala.analysis.CaseExpr.analyze(), com.cloudera.impala.analysis.AnalyticExpr.analyze(), com.cloudera.impala.analysis.FunctionCallExpr.analyze(), com.cloudera.impala.analysis.BoolLiteral.BoolLiteral(), com.cloudera.impala.analysis.CastExpr.CastExpr(), com.cloudera.impala.analysis.Expr.castTo(), com.cloudera.impala.analysis.Expr.checkReturnsBool(), com.cloudera.impala.analysis.Expr.collectChildReturnTypes(), com.cloudera.impala.analysis.NumericLiteral.debugString(), com.cloudera.impala.analysis.CastExpr.debugString(), com.cloudera.impala.analysis.NumericLiteral.explicitlyCastToFloat(), com.cloudera.impala.analysis.Expr.Expr(), com.cloudera.impala.analysis.ExtractFromExpr.ExtractFromExpr(), com.cloudera.impala.analysis.Expr.getResolvedWildCardType(), com.cloudera.impala.analysis.Expr.getType(), com.cloudera.impala.analysis.NumericLiteral.getUnscaledValue(), com.cloudera.impala.analysis.NullLiteral.NullLiteral(), com.cloudera.impala.analysis.NumericLiteral.NumericLiteral(), com.cloudera.impala.analysis.NullLiteral.resetAnalysisState(), com.cloudera.impala.analysis.SlotRef.SlotRef(), com.cloudera.impala.analysis.AnalyticExpr.standardize(), com.cloudera.impala.analysis.StringLiteral.StringLiteral(), com.cloudera.impala.analysis.Expr.toString(), com.cloudera.impala.analysis.NumericLiteral.toThrift(), com.cloudera.impala.analysis.Expr.treeToThrift(), com.cloudera.impala.analysis.Expr.trySubstitute(), com.cloudera.impala.analysis.NullLiteral.uncheckedCastTo(), com.cloudera.impala.analysis.StringLiteral.uncheckedCastTo(), com.cloudera.impala.analysis.NumericLiteral.uncheckedCastTo(), and com.cloudera.impala.analysis.SlotRef.uncheckedCastTo().
|
private |
Definition at line 25 of file BoolLiteral.java.
Referenced by com.cloudera.impala.analysis.BoolLiteral.BoolLiteral(), com.cloudera.impala.analysis.BoolLiteral.compareTo(), com.cloudera.impala.analysis.BoolLiteral.debugString(), com.cloudera.impala.analysis.BoolLiteral.equals(), com.cloudera.impala.analysis.BoolLiteral.getStringValue(), com.cloudera.impala.analysis.BoolLiteral.getValue(), and com.cloudera.impala.analysis.BoolLiteral.toThrift().