xiangfu0 commented on code in PR #9287: URL: https://github.com/apache/pinot/pull/9287#discussion_r956523860
########## pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/BaseTransformFunction.java: ########## @@ -298,12 +299,26 @@ public String[] transformToStringValuesSV(ProjectionBlock projectionBlock) { _stringValuesSV = new String[length]; } + DataType dataType = getResultMetadata().getDataType(); Dictionary dictionary = getDictionary(); if (dictionary != null) { int[] dictIds = transformToDictIdsSV(projectionBlock); - dictionary.readStringValues(dictIds, length, _stringValuesSV); + switch (dataType) { + case BOOLEAN: + for (int i = 0; i < length; i++) { + _stringValuesSV[i] = Boolean.toString(dictionary.getIntValue(dictIds[i]) == 1); + } + break; + case TIMESTAMP: + for (int i = 0; i < length; i++) { + _stringValuesSV[i] = new Timestamp(dictionary.getLongValue(dictIds[i])).toString(); + } + break; + default: + dictionary.readStringValues(dictIds, length, _stringValuesSV); Review Comment: also need a break? -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org