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/02/06 01:14:06 UTC

[GitHub] [pinot] richardstartin commented on a change in pull request #8138: prune unselected THEN statements in CaseTransformFunction

richardstartin commented on a change in pull request #8138:
URL: https://github.com/apache/pinot/pull/8138#discussion_r800106111



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/CaseTransformFunction.java
##########
@@ -102,8 +104,9 @@ private TransformResultMetadata calculateResultMetadata() {
     for (int i = 0; i < numThenStatements; i++) {
       TransformFunction thenStatement = _elseThenStatements.get(i + 1);
       TransformResultMetadata thenStatementResultMetadata = thenStatement.getResultMetadata();
-      Preconditions.checkState(thenStatementResultMetadata.isSingleValue(),
-          String.format("Unsupported multi-value expression in the THEN clause of index: %d", i));
+      if (!thenStatementResultMetadata.isSingleValue()) {

Review comment:
       Otherwise you call `String.format("Unsupported multi-value expression in the THEN clause of index: %d", i)` every time a function is initialised, which will jump out at you fairly quickly in an allocation profile.




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