Bug 131011 Support running query based on report document data
Data Engine should support running a query based on data set and expression data stored in a report document. This bugzilla entry serves as a repository for design docs and notes related to this feature.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/QueryExecutor.java
* @param temporaryComputedColumns
	 * @param result
	 */
	private void prepareFilter(Context cx, List dataSetFilters, List temporaryComputedColumns, List result) {
		if (dataSetFilters != null && !dataSetFilters.isEmpty()) {
			Iterator it = dataSetFilters.iterator();
			for (int i = 0; it.hasNext(); i++) {
				IFilterDefinition src = (IFilterDefinition) it.next();
				IBaseExpression expr = src.getExpression();
				if ( isGroupFilter( src )) {
					ConditionalExpression ce = ((ConditionalExpression) expr);
					String exprText = ce.getExpression().getText();
					ColumnInfo columnInfo = QueryExecutorUtil
							.getColInfoFromJSExpr(cx, exprText);
					int index = columnInfo.getColumnIndex();
					String name = columnInfo.getColumnName();
					if (name == null && index < 0) {
						
						
						
						temporaryComputedColumns.add(new ComputedColumn(
								"_{$TEMP_FILTER_" + i + "$}_", exprText,
								DataType.ANY_TYPE));
						it.remove();
						result.add(new FilterDefinition(
								new ConditionalExpression(new ScriptExpression(
										String.valueOf("dataSetRow[\"_{$TEMP_FILTER_" + i
												+ "$}_\"]")), ce.getOperator(), ce
										.getOperand1(), ce.getOperand2())));
					}