db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
Subject svn commit: r1522744 - in /db/derby/docs/branches/10.10/src: devguide/cdevspecialuda.dita ref/rrefsqljcreateaggregate.dita
Date Thu, 12 Sep 2013 22:19:20 GMT
Author: chaase3
Date: Thu Sep 12 22:19:20 2013
New Revision: 1522744

URL: http://svn.apache.org/r1522744
Log:
DERBY-6127  Tell users to make sure that the state of a user-defined aggregate needs to be
serializable 

Merged patch DERBY-6127.diff to 10.10 doc branch from trunk revision 1522740.

Modified:
    db/derby/docs/branches/10.10/src/devguide/cdevspecialuda.dita
    db/derby/docs/branches/10.10/src/ref/rrefsqljcreateaggregate.dita

Modified: db/derby/docs/branches/10.10/src/devguide/cdevspecialuda.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/branches/10.10/src/devguide/cdevspecialuda.dita?rev=1522744&r1=1522743&r2=1522744&view=diff
==============================================================================
--- db/derby/docs/branches/10.10/src/devguide/cdevspecialuda.dita (original)
+++ db/derby/docs/branches/10.10/src/devguide/cdevspecialuda.dita Thu Sep 12 22:19:20 2013
@@ -31,7 +31,14 @@ you to create custom aggregate operators
 <conbody>
 <section><p>A UDA is a Java class that implements the
 <i>org.apache.derby.agg.Aggregator</i> interface.</p>
-<p>For example, the following class provides an aggregate that computes the
+<p>The <i>org.apache.derby.agg.Aggregator</i> interface extends
+<i>java.io.Serializable</i>, so you must make sure that all of the state of your
+UDA is serializable. A UDA may be serialized to disk when it performs grouped
+aggregation over a large number of groups. That is, intermediate results may be
+serialized to disk for a query like the following:</p>
+<codeblock>SELECT a, myAggregate( b ) FROM myTable GROUP BY a</codeblock>
+<p>The serialization will fail if the UDA contains non-serializable fields.</p>
+<p>The following class provides an aggregate that computes the
 median value from a list of objects. This is a generic class. Its parameter must
 be a linear (<i>Comparable</i>) type.</p>
 <codeblock>import java.util.ArrayList;
@@ -91,6 +98,8 @@ select a, intMedian( b ) from intValues 
 ---
 aaa</systemoutput>
 </codeblock>
+<p>See "CREATE DERBY AGGREGATE statement" in the
+<ph conref="../conrefs.dita#pub/citref"></ph> for more information.</p>
 </section>
 </conbody>
 </concept>

Modified: db/derby/docs/branches/10.10/src/ref/rrefsqljcreateaggregate.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/branches/10.10/src/ref/rrefsqljcreateaggregate.dita?rev=1522744&r1=1522743&r2=1522744&view=diff
==============================================================================
--- db/derby/docs/branches/10.10/src/ref/rrefsqljcreateaggregate.dita (original)
+++ db/derby/docs/branches/10.10/src/ref/rrefsqljcreateaggregate.dita Thu Sep 12 22:19:20
2013
@@ -77,6 +77,13 @@ XML. If the <i>ReturnDataType</i> is omi
 a Java class which implements the <i>org.apache.derby.agg.Aggregator</i>
 interface. That contract is not checked until a statement is compiled which
 invokes the UDA.</p>
+<p>The <i>org.apache.derby.agg.Aggregator</i> interface extends
+<i>java.io.Serializable</i>, so you must make sure that all of the state of your
+UDA is serializable. A UDA may be serialized to disk when it performs grouped
+aggregation over a large number of groups. That is, intermediate results may be
+serialized to disk for a query like the following:</p>
+<codeblock>SELECT a, myAggregate( b ) FROM myTable GROUP BY a</codeblock>
+<p>The serialization will fail if the UDA contains non-serializable fields.</p>
 <p>The owner of the schema where the UDA lives automatically gains the USAGE
 privilege on the UDA and can grant this privilege to other users and roles. Only
 the <xref href="rrefattrib26867.dita#rrefattrib26867">database owner</xref> and



Mime
View raw message