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/08/19 22:37:13 UTC

[GitHub] [pinot] klsince commented on a change in pull request #7332: Infer the data type for LiteralTransformFunction

klsince commented on a change in pull request #7332:
URL: https://github.com/apache/pinot/pull/7332#discussion_r692531210



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/CaseTransformFunction.java
##########
@@ -104,147 +104,62 @@ private TransformResultMetadata calculateResultMetadata() {
       Preconditions.checkState(thenStatementResultMetadata.isSingleValue(),
           String.format("Unsupported multi-value expression in the THEN clause of index: %d", i));
       DataType thenStatementDataType = thenStatementResultMetadata.getDataType();
+      if (thenStatementDataType == dataType) {

Review comment:
       nit: perhaps add a comment for this method about how type is determined. iiuc, it seems like we try to find the most common type for all `then clauses` and `else clause` that can be cast to.




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