MCPcopy Create free account
hub / github.com/apache/calcite / equalsDeep

Method equalsDeep

core/src/main/java/org/apache/calcite/sql/SqlCall.java:178–197  ·  view source on GitHub ↗
(@Nullable SqlNode node, Litmus litmus)

Source from the content-addressed store, hash-verified

176 }
177
178 @Override public boolean equalsDeep(@Nullable SqlNode node, Litmus litmus) {
179 if (node == this) {
180 return true;
181 }
182 if (!(node instanceof SqlCall)) {
183 return litmus.fail("{} != {}", this, node);
184 }
185 SqlCall that = (SqlCall) node;
186
187 // Compare operators by name, not identity, because they may not
188 // have been resolved yet. Use case insensitive comparison since
189 // this may be a case insensitive system.
190 if (!this.getOperator().getName().equalsIgnoreCase(that.getOperator().getName())) {
191 return litmus.fail("{} != {}", this, node);
192 }
193 if (!equalDeep(this.getFunctionQuantifier(), that.getFunctionQuantifier(), litmus)) {
194 return litmus.fail("{} != {} (function quantifier differs)", this, node);
195 }
196 return equalDeep(this.getOperandList(), that.getOperandList(), litmus);
197 }
198
199 /**
200 * Returns a string describing the actual argument types of a call, e.g.

Callers 15

addAuxiliaryGroupExprMethod · 0.45
lookupAggregatesMethod · 0.45
equalsMethod · 0.45
indexOfDeepMethod · 0.45
isGroupExprMethod · 0.45
isMeasureExpMethod · 0.45
visitMethod · 0.45
getMonotonicityMethod · 0.45
visitMethod · 0.45

Calls 7

getOperatorMethod · 0.95
getFunctionQuantifierMethod · 0.95
getOperandListMethod · 0.95
equalsIgnoreCaseMethod · 0.80
equalDeepMethod · 0.80
failMethod · 0.65
getNameMethod · 0.65

Tested by 1

getNamedTypeMethod · 0.36