Class GroupByQueryResources

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class GroupByQueryResources
    extends Object
    implements Closeable
    This class contains resources required for a groupBy query execution. Currently, it contains only merge buffers, but any additional resources can be added in the future. It contains merge buffers for the execution of a) GroupByQueryQueryToolChest.mergeResults(QueryRunner) - Required for merging the results of the subqueries and the subtotals. b) GroupByMergingQueryRunner - Required for merging the results of the individual runners created by GroupByQueryRunnerFactory.createRunner(Segment) The resources should be acquired once throughout the execution of the query (with caveats such as union being treated as separate queries on the data servers) or it should release all the resources before re-acquiring them (if needed), to prevent deadlocks.