Jackie-Jiang commented on a change in pull request #8341:
URL: https://github.com/apache/pinot/pull/8341#discussion_r825415782
##########
File path:
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
##########
@@ -708,12 +708,12 @@ private static Expression
compileFunctionExpression(SqlBasicCall functionNode) {
case OTHER:
case OTHER_FUNCTION:
case DOT:
- functionName = functionNode.getOperator().getName().toUpperCase();
+ functionName = canonicalize(functionNode.getOperator().getName());
Review comment:
I understand the concern of allocating extra strings here, but
canonicalizing the function name to lower case here won't make things worse
because it can avoid the extra allocation in multiple places such as converting
to lower case in `FunctionContext` and creating `AggregationFunction` and
`TransformFunction`.
To further optimize this, we could potentially put all supported
aggregation/transform/SqlKind into a map, but not sure if it can really save
much and worth maintaining the map and code complexity as the map size could be
large if we put all these keys. I'd prefer keeping it this way for now and
optimize it in a separate PR if necessary.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]