MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / addSubExpression

Method addSubExpression

src/query/expression/ExpressionTree.java:84–100  ·  view source on GitHub ↗
(final ExpressionTree child, final int param_index)

Source from the content-addressed store, hash-verified

82 }
83
84 public void addSubExpression(final ExpressionTree child, final int param_index) {
85 if (child == null) {
86 throw new IllegalArgumentException("Cannot add a null child tree");
87 }
88 if (child == this) {
89 throw new IllegalDataException("Recursive sub expression detected: "
90 + this);
91 }
92 if (param_index < 0) {
93 throw new IllegalArgumentException("Parameter index must be 0 or greater");
94 }
95 if (sub_expressions == null) {
96 sub_expressions = Lists.newArrayList();
97 }
98 sub_expressions.add(child);
99 parameter_index.put(param_index, Parameter.SUB_EXPRESSION);
100 }
101
102 /**
103 * Sets the metric query key and index, setting the Parameter type to

Callers 6

addSubExpressionMethod · 0.95
parseParamMethod · 0.45

Calls 2

putMethod · 0.80
addMethod · 0.45

Tested by 5

addSubExpressionMethod · 0.76