You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/12/20 20:36:38 UTC

[GitHub] [pinot] subkanthi opened a new pull request, #10011: User friendly error message when only one column is passed to covariance function.

subkanthi opened a new pull request, #10011:
URL: https://github.com/apache/pinot/pull/10011

   User friendly error message when only one column is passed to covariance function.
   `covarpop`("1 column")` covarSamp`("1 column"), the error message currently shown is out of index, changing that to a user friendly message.
   
   


-- 
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@pinot.apache.org

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


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


[GitHub] [pinot] snleee commented on a diff in pull request #10011: User friendly error message when only one column is passed to covariance function.

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #10011:
URL: https://github.com/apache/pinot/pull/10011#discussion_r1053789334


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/CovarianceAggregationFunction.java:
##########
@@ -55,6 +56,9 @@ public class CovarianceAggregationFunction implements AggregationFunction<Covari
   protected final boolean _isSample;
 
   public CovarianceAggregationFunction(List<ExpressionContext> arguments, boolean isSample) {
+    if (arguments.size() != 2) {

Review Comment:
   Let's use `Precondition.checkArgument`. Please refer to `HistogramAggregationFunction`.



-- 
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@pinot.apache.org

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


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


[GitHub] [pinot] subkanthi commented on a diff in pull request #10011: User friendly error message when only one column is passed to covariance function.

Posted by GitBox <gi...@apache.org>.
subkanthi commented on code in PR #10011:
URL: https://github.com/apache/pinot/pull/10011#discussion_r1053929590


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/CovarianceAggregationFunction.java:
##########
@@ -55,6 +56,9 @@ public class CovarianceAggregationFunction implements AggregationFunction<Covari
   protected final boolean _isSample;
 
   public CovarianceAggregationFunction(List<ExpressionContext> arguments, boolean isSample) {
+    if (arguments.size() != 2) {

Review Comment:
   Changed. Thanks.



-- 
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@pinot.apache.org

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


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


[GitHub] [pinot] snleee commented on a diff in pull request #10011: User friendly error message when only one column is passed to covariance function.

Posted by GitBox <gi...@apache.org>.
snleee commented on code in PR #10011:
URL: https://github.com/apache/pinot/pull/10011#discussion_r1053787239


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/CovarianceAggregationFunction.java:
##########
@@ -55,6 +56,9 @@ public class CovarianceAggregationFunction implements AggregationFunction<Covari
   protected final boolean _isSample;
 
   public CovarianceAggregationFunction(List<ExpressionContext> arguments, boolean isSample) {
+    if (arguments.size() != 2) {
+      throw new BadQueryRequestException("Atleast two expressions need to be provided to calculate covariance");

Review Comment:
   `Atleast` -> `At least` ?



-- 
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@pinot.apache.org

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


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