@Override
  public Object evaluate(ExecutionContext context) throws FunctionDomainException,
      TypeMismatchException, NameResolutionException, QueryInvocationTargetException {
    CompiledValue rcvr = getReceiver();
    Object evalRcvr = rcvr.evaluate(context);

    if (context.isCqQueryContext()
        && (evalRcvr instanceof Region.Entry || evalRcvr instanceof CqEntry)) {
      try {
        if (evalRcvr instanceof Region.Entry) {
          Region.Entry re = (Region.Entry) evalRcvr;
          if (re.isDestroyed()) {
            return QueryService.UNDEFINED;
          }
          evalRcvr = re.getValue();
        } else if (evalRcvr instanceof CqEntry) {
          CqEntry re = (CqEntry) evalRcvr;
          evalRcvr = re.getValue();
        }
      } catch (EntryDestroyedException ede) {
        // Even though isDestory() check is made, the entry could
        // throw EntryDestroyedException if the value becomes null.
        return QueryService.UNDEFINED;
      }

    }

    // if the receiver is an iterator, then use the contrained type
    // for attribute evaluation instead of the runtime type

    // RuntimeIterator cmpItr = null;

    // if (rcvr.getType() == ID)
    // {
    // CompiledValue resolvedRcvr = context.resolve(((CompiledID)rcvr).getId());

    // if (resolvedRcvr != null && resolvedRcvr.getType() == ITERATOR)
    // cmpItr = ((RuntimeIterator)resolvedRcvr);
    // }

    // if (rcvr.getType() == ITERATOR)
    // cmpItr = (RuntimeIterator)rcvr;

    // if (cmpItr != null)
    // {
    // Class constraint = cmpItr.getBaseCollection().getConstraint();
    // return PathUtils.evaluateAttribute(evalRcvr,
    // constraint,
    // getTailID());
    // }

    Object obj = PathUtils.evaluateAttribute(context, evalRcvr, getTailID());
    // check for BucketRegion substitution
    PartitionedRegion pr = context.getPartitionedRegion();
    if (pr != null && (obj instanceof Region)) {
      if (pr.getFullPath().equals(((Region) obj).getFullPath())) {
        obj = context.getBucketRegion();
      }
    }
    return obj;
  }
Represents an identifier that follows a dot operator.

@version $Revision: 1.1 $
geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledPath.java