You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2013/03/22 16:16:16 UTC
svn commit: r1459837 -
/db/derby/code/trunk/java/engine/org/apache/derby/agg/Aggregator.java
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 );