title: Ordered iteration in an user-defined aggregate function?
body: <p>I just implemented the ODCIAggregate Interface to create a custom aggregation function. It works quite well and fast, but I would like it to do a little something more. I have a statement going like this:</p>
  
  <pre><code>SELECT SomeId, myAggregationFunction(Item) FROM
  (
    SELECT 
      Foo.SomeId, 
      SomeType(Foo.SomeValue, Foo.SomeOtherValue) AS Item
    FROM
      Foo
    ORDER BY Foo.SomeOrderingValue
  )
  GROUP BY SomeId;
  </code></pre>
  
  <p>My problem is that items aren't passed to the ODCIAggregateIterate function of my implementation in the same order that my inner (ordered) SELECT returns them.</p>
  
  <p>I've Googled around and didn't find any Oracle-provided way to do so. Has any of you experimented a similar problem based on that requirement?</p>
  
  <p>Thanks!</p>