Jackie-Jiang commented on a change in pull request #8304: URL: https://github.com/apache/pinot/pull/8304#discussion_r828545880
########## File path: pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/LiteralTransformFunction.java ########## @@ -57,12 +57,20 @@ public LiteralTransformFunction(String literal) { _literal = literal; _dataType = inferLiteralDataType(literal); + double mathLiteral; if (_dataType.isNumeric()) { BigDecimal bigDecimal = new BigDecimal(_literal); _intLiteral = bigDecimal.intValue(); _longLiteral = bigDecimal.longValue(); _floatLiteral = bigDecimal.floatValue(); _doubleLiteral = bigDecimal.doubleValue(); + } else if ((mathLiteral = getMathConstant(literal)) != 0) { Review comment: Blindly treating `E` and `PI` as number can cause unexpected behavior. They should be parsed within the math function context. Also I'd suggest addressing it in a separate PR. -- 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