MCPcopy Create free account
hub / github.com/apache/impala / castChild

Method castChild

fe/src/main/java/org/apache/impala/analysis/Expr.java:1661–1665  ·  view source on GitHub ↗

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. @param targetType type to be cast to @param childIndex index of child to be cast

(Type targetType, int childIndex)

Source from the content-addressed store, hash-verified

1659 * index of child to be cast
1660 */
1661 public void castChild(Type targetType, int childIndex) throws AnalysisException {
1662 Expr child = getChild(childIndex);
1663 Expr newChild = child.castTo(targetType);
1664 setChild(childIndex, newChild);
1665 }
1666
1667 /**
1668 * Convert child to to targetType, possibly by inserting an implicit cast, or by

Callers 2

castForFunctionCallMethod · 0.95
analyzeImplMethod · 0.45

Calls 3

castToMethod · 0.95
getChildMethod · 0.80
setChildMethod · 0.80

Tested by

no test coverage detected