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/document/RDSave.java
ByteArrayOutputStream tempBaos = new ByteArrayOutputStream( );
		BufferedOutputStream tempBos = new BufferedOutputStream( tempBaos );
		DataOutputStream tempDos = new DataOutputStream( tempBos );
		
		try
		{
			if ( rowStart == true )
			{
				if ( currIndex > 0 )
					IOUtil.writeInt( rowDos, rowSeparator );
				
				IOUtil.writeInt( tempDos, columnSeparator );				
			}
			else
			{
				IOUtil.writeInt( tempDos, columnSeparator );
			}
			
			IOUtil.writeString( tempDos, exprID );
			IOUtil.writeObject( tempDos, exprValue );
			
			tempDos.flush( );
			tempBos.flush( );
			tempBaos.flush( );
			
			byte[] bytes = tempBaos.toByteArray( );
			currRowBytes += bytes.length;
			IOUtil.writeRawBytes( rowDos, bytes );
			tempBaos = null;
			tempBos = null;