metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ardlema <...@git.apache.org>
Subject [GitHub] metamodel pull request: Refactoring to support scalar function
Date Wed, 29 Jul 2015 07:40:43 GMT
Github user ardlema commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/34#discussion_r35734602
  
    --- 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 --
    
    Change done!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message