You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "clintropolis (via GitHub)" <gi...@apache.org> on 2023/05/31 02:50:12 UTC

[GitHub] [druid] clintropolis commented on a diff in pull request #14352: Fix `EARLIEST_BY`/`LATEST_BY` signature and include function name in signature.

clintropolis commented on code in PR #14352:
URL: https://github.com/apache/druid/pull/14352#discussion_r1211031009


##########
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/EarliestLatestBySqlAggregator.java:
##########
@@ -168,12 +168,12 @@ private static class EarliestByLatestBySqlAggFunction extends SqlAggFunction
           InferTypes.RETURN_TYPE,
           OperandTypes.or(
               OperandTypes.sequence(
-                  "'" + aggregatorType.name() + "(expr, timeColumn)'\n",
+                  "'" + StringUtils.format("%s_BY", aggregatorType.name()) + "(expr, timeColumn)'\n",

Review Comment:
   these have single quotes surrounding them while others do not, is there a _right_ way to do this? I know its basically entirely cosmetic on what shows up in validation exceptions, but just wondering if there is any sort of standard as the javadocs don't seem to call out what the right thing to do is.
   
   Also how do things that are not using `OperandTypes.sequence` present themselves?



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org