private void createDerivedJoinResultsFromCC(String theCallingIndexReceiverId, CompiledComparison cc, ExecutionContext context) throws FunctionDomainException, TypeMismatchException, NameResolutionException, QueryInvocationTargetException { if (isCompiledPath(cc._right) && matchingPathIds(theCallingIndexReceiverId, cc._left)) { evaluateDerivedJoin(context, cc._right, new CompiledLiteral(cc._left.evaluate(context)), cc.getOperator()); } else if (isCompiledPath(cc._left) && matchingPathIds(theCallingIndexReceiverId, cc._right)) { evaluateDerivedJoin(context, cc._left, new CompiledLiteral(cc._right.evaluate(context)), cc.getOperator()); } }
public static SelectResults createResultCollection(ExecutionContext context, ObjectType elementType) { return context.isDistinct() ? new ResultsSet(elementType) : new ResultsBag(elementType, context.getCachePerfStats()); }
public static SelectResults createResultCollection(boolean distinct, ObjectType elementType, ExecutionContext context) { return distinct ? new ResultsSet(elementType) : new ResultsBag(elementType, context.getCachePerfStats()); }
public static SelectResults createStructCollection(ExecutionContext context, StructType elementType) { return context.isDistinct() ? new StructSet(elementType) : new StructBag(elementType, context.getCachePerfStats()); }
public static SelectResults createStructCollection(boolean distinct, StructType elementType, ExecutionContext context) { return distinct ? new StructSet(elementType) : new StructBag(elementType, context.getCachePerfStats()); }
/** bind a named iterator (to current scope) */ public void bindIterator(RuntimeIterator itr) { QScope currentScope = this.currentScope(); int currScopeID = currentScope.getScopeID(); itr.setScopeID(currScopeID); currentScope.bindIterator(itr); }
@Override public Set computeDependencies(ExecutionContext context) throws TypeMismatchException, AmbiguousNameException, NameResolutionException { CompiledValue v = context.resolve(getId()); return context.addDependencies(this, v.computeDependencies(context)); }
public void function(int function, int numOfChildren) { CompiledValue[] cvArr = new CompiledValue[numOfChildren]; for (int i = numOfChildren - 1; i >= 0; i--) { cvArr[i] = (CompiledValue) pop(); } push(new CompiledFunction(cvArr, function)); }
private void addition(int opKind) { CompiledValue v2 = (CompiledValue) pop(); CompiledValue v1 = (CompiledValue) pop(); push(new CompiledAddition(v1, v2, opKind)); }
private void division(int opKind) { CompiledValue v2 = (CompiledValue) pop(); CompiledValue v1 = (CompiledValue) pop(); push(new CompiledDivision(v1, v2, opKind)); }
public Query newQuery(String queryString, ProxyCache proxyCache) { Query query = newQuery(queryString); ((DefaultQuery) query).setProxyCache(proxyCache); return query; }
@Override public ScheduledFuture<?> schedule(final Runnable command, final long timeLimitMillis, final TimeUnit unit, final ScheduledExecutorService scheduledExecutorService, final DefaultQuery query) { final CacheRuntimeException lowMemoryException = createCancelationException(timeLimitMillis, query); query.setQueryCanceledException(lowMemoryException); throw lowMemoryException; }
/** * Adds a new entry with the specified key, value and hash code to the specified bucket. It is the * responsibility of this method to resize the table if appropriate. * * Subclass overrides this to alter the behavior of put method. */ void addEntry(int hash, Object key, int value, int bucketIndex) { Entry e = table[bucketIndex]; table[bucketIndex] = new Entry(hash, key, value, e); if (size++ >= threshold) resize(2 * table.length); }
@Override public void generateCanonicalizedExpression(StringBuilder clauseBuffer, ExecutionContext context) throws AmbiguousNameException, TypeMismatchException, NameResolutionException { // The compiled ID can be an iterator variable or it can be a path variable. // So first resolve the type of variable using ExecutionContext // A compiledID will get resolved either to a RunTimeIterator or a CompiledPath context.resolve(_id).generateCanonicalizedExpression(clauseBuffer, context); }
@Override public Set computeDependencies(ExecutionContext context) throws TypeMismatchException, AmbiguousNameException, NameResolutionException { context.addDependencies(this, _left.computeDependencies(context)); return context.addDependencies(this, _right.computeDependencies(context)); }
private void evalCanonicalizedExpressionForCSC(CompiledSortCriterion csc, ExecutionContext context, StringBuilder buffer) throws TypeMismatchException, NameResolutionException { csc.getExpr().generateCanonicalizedExpression(buffer, context); }