db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1459837 - /db/derby/code/trunk/java/engine/org/apache/derby/agg/Aggregator.java
Date Fri, 22 Mar 2013 15:16:16 GMT
Author: rhillegas
Date: Fri Mar 22 15:16:16 2013
New Revision: 1459837

URL: http://svn.apache.org/r1459837
Log:
DERBY-672: Improve the javadoc for the merge method of Aggregator so that implementors can
figure out how to test their code.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/agg/Aggregator.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/agg/Aggregator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/agg/Aggregator.java?rev=1459837&r1=1459836&r2=1459837&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/agg/Aggregator.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/agg/Aggregator.java Fri Mar 22 15:16:16
2013
@@ -39,10 +39,22 @@ public interface Aggregator<V,R,A extend
     public  void    accumulate( V value );
 
     /**
+     * <p>
      * For merging another partial result into this Aggregator.
      * This lets the SQL interpreter divide the incoming rows into
      * subsets, aggregating each subset in isolation, and then merging
-     * the partial results together.
+     * the partial results together. This method can be called when
+     * performing a grouped aggregation with a large number of groups.
+     * While processing such a query, Derby may write intermediate grouped
+     * results to disk. The intermediate results may be retrieved and merged
+     * with later results if Derby encounters later rows which belong to groups
+     * whose intermediate results have been written to disk. This situation can
+     * occur with a query like the following:
+     * </p>
+     *
+     * <pre>
+     * select a, mode( b ) from mode_inputs group by a order by a
+     * </pre>
      */
     public  void    merge( A otherAggregator );
 



Mime
View raw message