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 2021/12/07 21:33:55 UTC

[GitHub] [pinot] kishansairam9 opened a new pull request #7877: Improve unsupported function error msg (#7609)

kishansairam9 opened a new pull request #7877:
URL: https://github.com/apache/pinot/pull/7877


   ## Description
   <!-- Add a description of your PR here.
   A good description should include pointers to an issue or design document, etc.
   -->
   Address https://github.com/apache/pinot/issues/7609 by improving error message.
   
   Implemented by returning an additional boolean indicating presence of funciton in `FUNCTION_INFO_MAP`. 
   Used it to narrow type of error - function not found / argument count mismatch
   ## Upgrade Notes
   Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
   * [ ] Yes (Please label as **<code>backward-incompat</code>**, and complete the section below on Release Notes)
   
   Does this PR fix a zero-downtime upgrade introduced earlier?
   * [ ] Yes (Please label this as **<code>backward-incompat</code>**, and complete the section below on Release Notes)
   
   Does this PR otherwise need attention when creating release notes? Things to consider:
   - New configuration options
   - Deprecation of configurations
   - Signature changes to public methods/interfaces
   - New plugins added or old plugins removed
   * [x] Yes (Please label this PR as **<code>release-notes</code>** and complete the section on Release Notes)
   ## Release Notes
   <!-- If you have tagged this as either backward-incompat or release-notes,
   you MUST add text here that you would like to see appear in release notes of the
   next release. -->
   * Modified return type of `FactoryRegistry.getFunctionInfo` to `ImmutablePair<Boolean, FunctionInfo>`
   <!-- If you have a series of commits adding or enabling a feature, then
   add this section only in final commit that marks the feature completed.
   Refer to earlier release notes to see examples of text.
   -->
   ## Documentation
   <!-- If you have introduced a new feature or configuration, please add it to the documentation as well.
   See https://docs.pinot.apache.org/developers/developers-and-contributors/update-document
   -->
   Function documentation updated to reflect new signature


-- 
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] kishansairam9 edited a comment on pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
kishansairam9 edited a comment on pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#issuecomment-990395612


   By looking at code related to failing tests, I felt that it might be better to change exception type rather than tests. I say so because test failures weren't caused by direct invocation of modified functions but as part of chained calls. This might lead to cascading effect on number of changes required in tests given that `planExecution` could be one of primitive functions.
   
   That being said, my opinion is based on very limited understanding of repo. In case it is be preferred to change tests itself, it would be great if you could leave pointers on those which would require modification.


-- 
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] kishansairam9 edited a comment on pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
kishansairam9 edited a comment on pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#issuecomment-990395612


   By looking at code related to failing tests, I felt that it might be better to change exception type rather than tests. I say so because test failures weren't caused by direct invocation of modified functions but as part of chained calls. This might lead to cascading effect on number of changes required in tests given that `planExecution` could be one of primitive functions.
   
   That being said, my opinion is based on very limited understanding of repo. In case it would be preferred to change tests itself, it would be great if you could leave pointers on those which would require modification.


-- 
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] Jackie-Jiang commented on a change in pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765361548



##########
File path: pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java
##########
@@ -106,14 +107,18 @@ public static boolean containsFunction(String functionName) {
   }
 
   /**
-   * Returns the {@link FunctionInfo} associated with the given function name and number of parameters, or {@code null}
-   * if there is no matching method. This method should be called after the FunctionRegistry is initialized and all
-   * methods are already registered.
+   * Returns a pair <{@code true}, {@link FunctionInfo}> associated with the given function name and number of
+   * parameters if it exists, <{@code true}, {@code null}> if method exists but number of parameters do not match,
+   * else if there is no matching method <{@code false}, {@code null}>. This method should be called after the
+   * FunctionRegistry is initialized and all methods are already registered.
    */
   @Nullable
-  public static FunctionInfo getFunctionInfo(String functionName, int numParameters) {
+  public static ImmutablePair<Boolean, FunctionInfo> getFunctionInfo(String functionName, int numParameters) {

Review comment:
       Yes, I also noticed that, but that might involve small overhead of canonicalizing function name and map lookup (should be fine as that only happen when this method returns `null`). IMO both way work, and you may choose the one you prefer




-- 
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] Jackie-Jiang commented on pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#issuecomment-990292524


   @kishansairam9 The tests failed because the exception type changed. I feel it is preferred to throw `BadQueryRequestException`, then we should change the tests


-- 
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] xiangfu0 merged pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
xiangfu0 merged pull request #7877:
URL: https://github.com/apache/pinot/pull/7877


   


-- 
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] kishansairam9 commented on a change in pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
kishansairam9 commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765368229



##########
File path: pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java
##########
@@ -106,14 +107,18 @@ public static boolean containsFunction(String functionName) {
   }
 
   /**
-   * Returns the {@link FunctionInfo} associated with the given function name and number of parameters, or {@code null}
-   * if there is no matching method. This method should be called after the FunctionRegistry is initialized and all
-   * methods are already registered.
+   * Returns a pair <{@code true}, {@link FunctionInfo}> associated with the given function name and number of
+   * parameters if it exists, <{@code true}, {@code null}> if method exists but number of parameters do not match,
+   * else if there is no matching method <{@code false}, {@code null}>. This method should be called after the
+   * FunctionRegistry is initialized and all methods are already registered.
    */
   @Nullable
-  public static FunctionInfo getFunctionInfo(String functionName, int numParameters) {
+  public static ImmutablePair<Boolean, FunctionInfo> getFunctionInfo(String functionName, int numParameters) {

Review comment:
       I felt that using `containsFunction` might improve readability and changes are as in commit https://github.com/apache/pinot/commit/8865d2e14d8dc6de4e84ddcfca7aae9e29dc5364 .
   
   But when it comes to overhead, it might be more than only when it returns `null` due to additional pre-checks in certain cases. Specifically in `InbuiltFunctionEvaluator.planExecution` and constructor of `PostAggregationFunction`. 
   
   Could you comment on performance implications of additional map lookup in these places? If it can be significant, I will resort to creating a new exception.




-- 
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] kishansairam9 commented on a change in pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
kishansairam9 commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765349404



##########
File path: pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java
##########
@@ -106,14 +107,18 @@ public static boolean containsFunction(String functionName) {
   }
 
   /**
-   * Returns the {@link FunctionInfo} associated with the given function name and number of parameters, or {@code null}
-   * if there is no matching method. This method should be called after the FunctionRegistry is initialized and all
-   * methods are already registered.
+   * Returns a pair <{@code true}, {@link FunctionInfo}> associated with the given function name and number of
+   * parameters if it exists, <{@code true}, {@code null}> if method exists but number of parameters do not match,
+   * else if there is no matching method <{@code false}, {@code null}>. This method should be called after the
+   * FunctionRegistry is initialized and all methods are already registered.
    */
   @Nullable
-  public static FunctionInfo getFunctionInfo(String functionName, int numParameters) {
+  public static ImmutablePair<Boolean, FunctionInfo> getFunctionInfo(String functionName, int numParameters) {

Review comment:
       Thank you for your feedback! While trying to refactor with an exception I realised we have `containsFunction` method for `FunctionRegistry` class which can be used for the required functionailty. I will update PR with required logic, apologies for the overlook.




-- 
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] Jackie-Jiang commented on a change in pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765288020



##########
File path: pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java
##########
@@ -106,14 +107,18 @@ public static boolean containsFunction(String functionName) {
   }
 
   /**
-   * Returns the {@link FunctionInfo} associated with the given function name and number of parameters, or {@code null}
-   * if there is no matching method. This method should be called after the FunctionRegistry is initialized and all
-   * methods are already registered.
+   * Returns a pair <{@code true}, {@link FunctionInfo}> associated with the given function name and number of
+   * parameters if it exists, <{@code true}, {@code null}> if method exists but number of parameters do not match,
+   * else if there is no matching method <{@code false}, {@code null}>. This method should be called after the
+   * FunctionRegistry is initialized and all methods are already registered.
    */
   @Nullable
-  public static FunctionInfo getFunctionInfo(String functionName, int numParameters) {
+  public static ImmutablePair<Boolean, FunctionInfo> getFunctionInfo(String functionName, int numParameters) {

Review comment:
       I feel returning a pair makes this method hard to use. Suggest throwing exception when this method cannot find a matching function registered, which contains the information on whether the function is not registered, or the parameters not match




-- 
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] Jackie-Jiang commented on a change in pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765372817



##########
File path: pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java
##########
@@ -106,14 +107,18 @@ public static boolean containsFunction(String functionName) {
   }
 
   /**
-   * Returns the {@link FunctionInfo} associated with the given function name and number of parameters, or {@code null}
-   * if there is no matching method. This method should be called after the FunctionRegistry is initialized and all
-   * methods are already registered.
+   * Returns a pair <{@code true}, {@link FunctionInfo}> associated with the given function name and number of
+   * parameters if it exists, <{@code true}, {@code null}> if method exists but number of parameters do not match,
+   * else if there is no matching method <{@code false}, {@code null}>. This method should be called after the
+   * FunctionRegistry is initialized and all methods are already registered.
    */
   @Nullable
-  public static FunctionInfo getFunctionInfo(String functionName, int numParameters) {
+  public static ImmutablePair<Boolean, FunctionInfo> getFunctionInfo(String functionName, int numParameters) {

Review comment:
       I don't think the overhead is significant, but it is good to eliminate it if possible. See the suggested change




-- 
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] kishansairam9 commented on pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
kishansairam9 commented on pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#issuecomment-990395612


   By looking at failing code related to failing tests, I felt that it might be better to change exception type rather than tests. I say so because test failures weren't caused by direct invocation of modified functions but as part of chained calls. This might lead to cascading effect on number of changes required in tests given that `planExecution` could be one of primitive functions.
   
   That being said, my opinion is based on very limited understanding of repo. In case it would be preferred to change tests itself, it would be great if you could leave pointers on those which would require modification.


-- 
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] kishansairam9 commented on a change in pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
kishansairam9 commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765385523



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/query/postaggregation/PostAggregationFunction.java
##########
@@ -36,6 +36,8 @@
   private final ColumnDataType _resultType;
 
   public PostAggregationFunction(String functionName, ColumnDataType[] argumentTypes) {
+    Preconditions.checkArgument(FunctionRegistry.containsFunction(functionName), "Unsupported function: %s not found", 

Review comment:
       Addressed in https://github.com/apache/pinot/commit/f02a015291428e62f7f3dc31b10a323844a4e447




-- 
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] kishansairam9 commented on pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
kishansairam9 commented on pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#issuecomment-988280051


   Requesting review @xiangfu0 


-- 
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] codecov-commenter edited a comment on pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#issuecomment-988331561


   # [Codecov](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#7877](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3d75006) into [master](https://codecov.io/gh/apache/pinot/commit/c999a23caae3e3769e1729d56da4c5c0de594b31?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c999a23) will **increase** coverage by `0.00%`.
   > The diff coverage is `65.21%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/pinot/pull/7877/graphs/tree.svg?width=650&height=150&src=pr&token=4ibza2ugkz&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #7877   +/-   ##
   =========================================
     Coverage     65.07%   65.08%           
   + Complexity     4082     4081    -1     
   =========================================
     Files          1538     1538           
     Lines         79993    80007   +14     
     Branches      12035    12036    +1     
   =========================================
   + Hits          52057    52071   +14     
   + Misses        24219    24215    -4     
   - Partials       3717     3721    +4     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | unittests1 | `68.47% <65.21%> (-0.03%)` | :arrow_down: |
   | unittests2 | `14.42% <0.00%> (+0.02%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...r/transform/function/TransformFunctionFactory.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9vcGVyYXRvci90cmFuc2Zvcm0vZnVuY3Rpb24vVHJhbnNmb3JtRnVuY3Rpb25GYWN0b3J5LmphdmE=) | `79.09% <33.33%> (-2.64%)` | :arrow_down: |
   | [...query/postaggregation/PostAggregationFunction.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9xdWVyeS9wb3N0YWdncmVnYXRpb24vUG9zdEFnZ3JlZ2F0aW9uRnVuY3Rpb24uamF2YQ==) | `88.23% <80.00%> (+1.13%)` | :arrow_up: |
   | [...gment/local/function/InbuiltFunctionEvaluator.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9mdW5jdGlvbi9JbmJ1aWx0RnVuY3Rpb25FdmFsdWF0b3IuamF2YQ==) | `91.66% <80.00%> (-1.32%)` | :arrow_down: |
   | [...apache/pinot/common/function/FunctionRegistry.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vZnVuY3Rpb24vRnVuY3Rpb25SZWdpc3RyeS5qYXZh) | `84.84% <100.00%> (+0.97%)` | :arrow_up: |
   | [.../parsers/rewriter/CompileTimeFunctionsInvoker.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcWwvcGFyc2Vycy9yZXdyaXRlci9Db21waWxlVGltZUZ1bmN0aW9uc0ludm9rZXIuamF2YQ==) | `90.47% <100.00%> (ø)` | |
   | [...core/startree/operator/StarTreeFilterOperator.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zdGFydHJlZS9vcGVyYXRvci9TdGFyVHJlZUZpbHRlck9wZXJhdG9yLmphdmE=) | `67.13% <0.00%> (-15.39%)` | :arrow_down: |
   | [...nt/local/startree/v2/store/StarTreeDataSource.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9zdGFydHJlZS92Mi9zdG9yZS9TdGFyVHJlZURhdGFTb3VyY2UuamF2YQ==) | `40.00% <0.00%> (-13.34%)` | :arrow_down: |
   | [...ot/segment/local/startree/OffHeapStarTreeNode.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9zdGFydHJlZS9PZmZIZWFwU3RhclRyZWVOb2RlLmphdmE=) | `72.22% <0.00%> (-5.56%)` | :arrow_down: |
   | [.../helix/core/minion/MinionInstancesCleanupTask.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29udHJvbGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29udHJvbGxlci9oZWxpeC9jb3JlL21pbmlvbi9NaW5pb25JbnN0YW5jZXNDbGVhbnVwVGFzay5qYXZh) | `77.27% <0.00%> (-4.55%)` | :arrow_down: |
   | [...lix/core/realtime/PinotRealtimeSegmentManager.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29udHJvbGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29udHJvbGxlci9oZWxpeC9jb3JlL3JlYWx0aW1lL1Bpbm90UmVhbHRpbWVTZWdtZW50TWFuYWdlci5qYXZh) | `76.96% <0.00%> (-3.15%)` | :arrow_down: |
   | ... and [11 more](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [c999a23...3d75006](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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] codecov-commenter commented on pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#issuecomment-988331561


   # [Codecov](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#7877](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3d75006) into [master](https://codecov.io/gh/apache/pinot/commit/c999a23caae3e3769e1729d56da4c5c0de594b31?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c999a23) will **decrease** coverage by `50.64%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/pinot/pull/7877/graphs/tree.svg?width=650&height=150&src=pr&token=4ibza2ugkz&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@              Coverage Diff              @@
   ##             master    #7877       +/-   ##
   =============================================
   - Coverage     65.07%   14.42%   -50.65%     
   + Complexity     4082       80     -4002     
   =============================================
     Files          1538     1538               
     Lines         79993    80007       +14     
     Branches      12035    12036        +1     
   =============================================
   - Hits          52057    11544    -40513     
   - Misses        24219    67609    +43390     
   + Partials       3717      854     -2863     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | unittests1 | `?` | |
   | unittests2 | `14.42% <0.00%> (+0.02%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...apache/pinot/common/function/FunctionRegistry.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vZnVuY3Rpb24vRnVuY3Rpb25SZWdpc3RyeS5qYXZh) | `0.00% <0.00%> (-83.88%)` | :arrow_down: |
   | [.../parsers/rewriter/CompileTimeFunctionsInvoker.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcWwvcGFyc2Vycy9yZXdyaXRlci9Db21waWxlVGltZUZ1bmN0aW9uc0ludm9rZXIuamF2YQ==) | `0.00% <0.00%> (-90.48%)` | :arrow_down: |
   | [...r/transform/function/TransformFunctionFactory.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9vcGVyYXRvci90cmFuc2Zvcm0vZnVuY3Rpb24vVHJhbnNmb3JtRnVuY3Rpb25GYWN0b3J5LmphdmE=) | `0.00% <0.00%> (-81.74%)` | :arrow_down: |
   | [...query/postaggregation/PostAggregationFunction.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9xdWVyeS9wb3N0YWdncmVnYXRpb24vUG9zdEFnZ3JlZ2F0aW9uRnVuY3Rpb24uamF2YQ==) | `0.00% <0.00%> (-87.10%)` | :arrow_down: |
   | [...gment/local/function/InbuiltFunctionEvaluator.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9mdW5jdGlvbi9JbmJ1aWx0RnVuY3Rpb25FdmFsdWF0b3IuamF2YQ==) | `0.00% <0.00%> (-92.99%)` | :arrow_down: |
   | [...ain/java/org/apache/pinot/core/data/table/Key.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL3RhYmxlL0tleS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [.../java/org/apache/pinot/spi/utils/BooleanUtils.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdXRpbHMvQm9vbGVhblV0aWxzLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [.../java/org/apache/pinot/core/data/table/Record.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL3RhYmxlL1JlY29yZC5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [.../java/org/apache/pinot/core/util/GroupByUtils.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS91dGlsL0dyb3VwQnlVdGlscy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ava/org/apache/pinot/spi/config/table/FSTType.java](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvY29uZmlnL3RhYmxlL0ZTVFR5cGUuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [1058 more](https://codecov.io/gh/apache/pinot/pull/7877/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [c999a23...3d75006](https://codecov.io/gh/apache/pinot/pull/7877?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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] kishansairam9 commented on a change in pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
kishansairam9 commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765385684



##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/function/InbuiltFunctionEvaluator.java
##########
@@ -69,6 +69,8 @@ private ExecutableNode planExecution(ExpressionContext expression) {
           childNodes[i] = planExecution(arguments.get(i));
         }
         String functionName = function.getFunctionName();
+        Preconditions.checkState(FunctionRegistry.containsFunction(functionName), "Unsupported function: %s not found", 

Review comment:
       Addressed in https://github.com/apache/pinot/commit/f02a015291428e62f7f3dc31b10a323844a4e447




-- 
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] Jackie-Jiang commented on a change in pull request #7877: Improve unsupported function error msg (#7609)

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on a change in pull request #7877:
URL: https://github.com/apache/pinot/pull/7877#discussion_r765372462



##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/function/InbuiltFunctionEvaluator.java
##########
@@ -69,6 +69,8 @@ private ExecutableNode planExecution(ExpressionContext expression) {
           childNodes[i] = planExecution(arguments.get(i));
         }
         String functionName = function.getFunctionName();
+        Preconditions.checkState(FunctionRegistry.containsFunction(functionName), "Unsupported function: %s not found", 

Review comment:
       Same here

##########
File path: pinot-core/src/main/java/org/apache/pinot/core/query/postaggregation/PostAggregationFunction.java
##########
@@ -36,6 +36,8 @@
   private final ColumnDataType _resultType;
 
   public PostAggregationFunction(String functionName, ColumnDataType[] argumentTypes) {
+    Preconditions.checkArgument(FunctionRegistry.containsFunction(functionName), "Unsupported function: %s not found", 

Review comment:
       Suggest expanding the existing preconditions check similar to how it is handled in `TransformFunctionFactory` to avoid the unnecessary overhead
   ```suggestion
       if (functionInfo == null) {
         if (FunctionRegistry.containsFunction(functionName)) {
           throw new IllegalArgumentException(...);
         } else {
           throw new IllegalArgumentException(...);
         }
       }
   ```




-- 
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