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

    https://github.com/apache/metamodel/pull/85#discussion_r49462487
  
    --- Diff: 
core/src/main/java/org/apache/metamodel/query/parser/SelectItemParser.java ---
    @@ -157,6 +161,21 @@ public SelectItem findSelectItem(String expression) 
throws MultipleSelectItemsPa
                 if ("*".equals(columnName)) {
                     throw new MultipleSelectItemsParsedException(fromItem);
                 } else if (fromItem.getTable() != null) {
    +                if (selectItemHasParenthesis) {
    +                    if 
(functionName.equals(FunctionType.CONCAT.getFunctionName())) {
    +                        String[] columnAndParametersAsString = 
expression.split(",");
    +                        Object[] columnAndParameters = new 
Object[columnAndParametersAsString.length];
    +                        int columnAndParamsIndex = 0;
    +                        for (String parameter : 
columnAndParametersAsString) {
    +                            Column column = 
fromItem.getTable().getColumnByName(parameter);
    +                            if (column != null) 
columnAndParameters[columnAndParamsIndex] = column;
    +                            else columnAndParameters[columnAndParamsIndex] 
= parameter.substring(1,parameter.length()-1);
    --- End diff --
    
    We should follow code conventions here and have newline and curly braces so 
that it becomes:
    ```
    if (something) {
      something;
    } else {
      something;
    }
    ```


---
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