cheddar commented on a change in pull request #11949:
URL: https://github.com/apache/druid/pull/11949#discussion_r752850395



##########
File path: docs/querying/sql.md
##########
@@ -353,9 +353,13 @@ Only the COUNT, ARRAY_AGG, and STRING_AGG aggregations can 
accept the DISTINCT k
 |`STDDEV_SAMP(expr)`|Computes standard deviation sample of `expr`. See [stats 
extension](../development/extensions-core/stats.md) documentation for 
additional details.|`null` if `druid.generic.useDefaultValueForNull=false`, 
otherwise `0`|
 |`STDDEV(expr)`|Computes standard deviation sample of `expr`. See [stats 
extension](../development/extensions-core/stats.md) documentation for 
additional details.|`null` if `druid.generic.useDefaultValueForNull=false`, 
otherwise `0`|
 |`EARLIEST(expr)`|Returns the earliest value of `expr`, which must be numeric. 
If `expr` comes from a relation with a timestamp column (like a Druid 
datasource) then "earliest" is the value first encountered with the minimum 
overall timestamp of all values being aggregated. If `expr` does not come from 
a relation with a timestamp, then it is simply the first value 
encountered.|`null` if `druid.generic.useDefaultValueForNull=false`, otherwise 
`0`|
+|`EARLIEST(expr, timeColumn)`|Returns the earliest value of `expr`, which must 
be numeric. Earliest value is defined as the first last encountered with the 
minimum overall value of time column of all values being aggregated.|`null` if 
`druid.generic.useDefaultValueForNull=false`, otherwise `0`|

Review comment:
       > defined as the first last
   
   Well, which is it!?  I think you mean "value" instead of "last"

##########
File path: 
processing/src/test/java/org/apache/druid/query/aggregation/first/FloatFirstAggregationTest.java
##########
@@ -91,7 +95,25 @@ public void testDoubleFirstAggregator()
   }
 
   @Test
-  public void testDoubleFirstBufferAggregator()
+  public void testFloatFirstAggregatorWithTimeColumn()
+  {
+    Aggregator agg = new FloatFirstAggregatorFactory("billy", "nilly", 
"customTime").factorize(colSelectorFactory);
+
+    aggregate(agg);

Review comment:
       at 4 calls, a loop would save 1 line.  Who knows which is actually more 
better.  There is a simplicity to just having the same thing written 4 times.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to