}
for (int i = 0; i < keyPropertiesJoin.size(); i++)
{
QueryGraphValueEntryHashKeyed keyDesc = keyPropertiesJoin.get(i);
ExprNode compareNode = keyDesc.getKeyExpr();
Class keyPropType = JavaClassHelper.getBoxedType(compareNode.getExprEvaluator().getType());
Class indexedPropType = JavaClassHelper.getBoxedType(allStreamTypesZeroIndexed[0].getPropertyType(indexPropertiesJoin[i]));
Class coercionType = indexedPropType;
if (keyPropType != indexedPropType)
{
coercionType = JavaClassHelper.getCompareToCoercionType(keyPropType, indexedPropType);
}
SubordPropHashKey desc;
if (keyPropertiesJoin.get(i) instanceof QueryGraphValueEntryHashKeyedExpr) {
QueryGraphValueEntryHashKeyedExpr keyExpr = (QueryGraphValueEntryHashKeyedExpr) keyPropertiesJoin.get(i);
Integer keyStreamNum = keyExpr.isRequiresKey() ? stream : null;
desc = new SubordPropHashKey(keyDesc, keyStreamNum, coercionType);
}
else {
QueryGraphValueEntryHashKeyedProp prop = (QueryGraphValueEntryHashKeyedProp) keyDesc;
desc = new SubordPropHashKey(prop, stream, coercionType);
}
joinProps.put(indexPropertiesJoin[i], desc);
}
}
// handle range lookups
QueryGraphValuePairRangeIndex rangeKeysAndIndexes = queryGraphValue.getRangeProps();
String[] rangeIndexes = rangeKeysAndIndexes.getIndexed();
List<QueryGraphValueEntryRange> rangeDescs = rangeKeysAndIndexes.getKeys();
if (rangeDescs.isEmpty()) {
continue;
}
// get all ranges lookups
int count = -1;
for (QueryGraphValueEntryRange rangeDesc : rangeDescs) {
count++;
String rangeIndexProp = rangeIndexes[count];
SubordPropRangeKey subqRangeDesc = rangeProps.get(rangeIndexProp);
// other streams may specify the start or end endpoint of a range, therefore this operation can be additive
if (subqRangeDesc != null) {
if (subqRangeDesc.getRangeInfo().getType().isRange()) {
continue;
}
// see if we can make this additive by using a range
QueryGraphValueEntryRangeRelOp relOpOther = (QueryGraphValueEntryRangeRelOp) subqRangeDesc.getRangeInfo();
QueryGraphValueEntryRangeRelOp relOpThis = (QueryGraphValueEntryRangeRelOp) rangeDesc;
QueryGraphRangeConsolidateDesc opsDesc = QueryGraphRangeUtil.getCanConsolidate(relOpThis.getType(), relOpOther.getType());
if (opsDesc != null) {
ExprNode start;
ExprNode end;
int streamNumStart;
int streamNumEnd;
if (!opsDesc.isReverse()) {
start = relOpOther.getExpression();
end = relOpThis.getExpression();