Github user kaspersorensen commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/34#discussion_r35730748
  
    --- Diff: 
core/src/main/java/org/apache/metamodel/query/parser/SelectItemParser.java ---
    @@ -113,10 +110,10 @@ public SelectItem findSelectItem(String expression) 
throws MultipleSelectItemsPa
             final int startParenthesis = expression.indexOf('(');
             if (startParenthesis > 0 && expression.endsWith(")")) {
                 String functionName = expression.substring(0, 
startParenthesis);
    -            function = FunctionType.get(functionName.toUpperCase());
    +            function = FunctionTypeFactory.get(functionName.toUpperCase());
                 if (function != null) {
                     expression = expression.substring(startParenthesis + 1, 
expression.length() - 1).trim();
    -                if (function == FunctionType.COUNT && 
"*".equals(expression)) {
    +                if (function.toString().equals("COUNT") && 
"*".equals(expression)) {
    --- End diff --
    
    IMO it is better to compare the function object than comparing tostring. 
And I think we discussed having the builtin functions on the FunctionType 
interface still.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to