1. A computer-readable storage medium storing computer-executable instructions for performing a method comprising: receiving a query that identifies a first input data source; identifying a query category from a group of query categories for a first query operator in the received query based on whether the first query operator provides an output that supports random access, wherein the query categories include a first category for query operators that provide an output that supports random access, a second category for query operators that provide an output that supports random access when an input of the query operator supports random access, and a third category for query operators that provide an output that does not support random access; identifying a data source category for the first input data source from a group of data source categories, wherein the data source categories include a first category for input data sources that support random access to the data source, and a second category for input data sources that do not support random access to the data source; and generating a first results object based on the identified query category and the identified data source category, wherein the first results object supports at least one of random access and sequential access to results produced by the first query operator, and wherein the first results object supports random access to results produced by the first query operator by providing a first method for returning a value representing a number of elements in the results produced by the first query operator, and a second method for returning an indexed element from the results produced by the first query operator.
9. The computer-readable storage medium of claim 1 , wherein the method further comprises: executing the query in a parallel manner with a plurality of processors.