public void pushLiteral(Object obj) { push(new CompiledLiteral(obj)); }
private void replaceAggregateFunctionInProjection() { // Extract the parameter compiledValues out of aggregate functions & // modify the projection // attributes to have that instead. Empty out the groupByList // Create orderby attribute out of group by int bitStart = 0; for (CompiledAggregateFunction aggFunc : this.aggregateFunctions) { int index = this.aggregateColsPos.nextSetBit(bitStart); bitStart = index + 1; CompiledValue param = aggFunc.getParameter(); if (param == null && aggFunc.getFunctionType() == OQLLexerTokenTypes.COUNT) { // * case of *, substitue a dummy parameter of compiled literal = 0 to // satisfy the code param = new CompiledLiteral(0); } else if (param == null) { throw new QueryInvalidException("aggregate function passed invalid parameter"); } Object[] projAtt = (Object[]) this.projAttrs.get(index); projAtt[1] = param; } }
new CompiledLiteral(LOWEST_STRING), OQLLexerTokenTypes.TOK_GE), this}; String upperBound = buffer.toString(); CompiledComparison c1 = new CompiledComparison(var, new CompiledLiteral(lowerBound), OQLLexerTokenTypes.TOK_GE); CompiledComparison c2 = new CompiledComparison(var, new CompiledLiteral(upperBound), OQLLexerTokenTypes.TOK_LT); new CompiledLiteral(LOWEST_STRING), OQLLexerTokenTypes.TOK_GE), this}; } else { new CompiledComparison(var, new CompiledLiteral(buffer.toString()), getOperator())};
Object limitObject = queryComponents.remove(OQLLexerTokenTypes.LIMIT); if (limitObject instanceof Integer) { limit = new CompiledLiteral(limitObject); } else { limit = (CompiledBindArgument) limitObject;
private void queryIndex(Object key, IndexInfo indexInfo, SelectResults results, CompiledValue iterOperands, RuntimeIterator[] indpndntItrs, ExecutionContext context, List projAttrib, boolean conditioningNeeded) throws TypeMismatchException, FunctionDomainException, NameResolutionException, QueryInvocationTargetException { assert indexInfo != null; assert indexInfo._index != null; // Get new IndexInfo to put in context as we dont want it to evaluate // key collection again if its a CompiledSelect (Nested Query). IndexInfo contextIndexInfo = new IndexInfo(new CompiledLiteral(key), indexInfo._path(), indexInfo._getIndex(), 0, null, indexInfo._operator()); context.cachePut(CompiledValue.INDEX_INFO, contextIndexInfo); indexInfo._index.query(key, TOK_EQ, results, !conditioningNeeded ? iterOperands : null, indpndntItrs == null ? null : indpndntItrs[0], context, projAttrib, null, false); }
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()); } }
evalOperands.clear(); evalCount = 1; evalOperands.add(new CompiledLiteral(Boolean.FALSE)); } else if (filter != null) { evalCount++; evalOperands.add(new CompiledLiteral(Boolean.FALSE));
new CompiledJunction(new CompiledValue[] {compiledValue1, compiledValue2}, 89), new CompiledLike(compiledValue1, compiledValue2), new CompiledLiteral(compiledValue1), new CompiledMod(compiledValue1, compiledValue2, 13), new CompiledMultiplication(compiledValue1, compiledValue2, 13),