metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LosD <...@git.apache.org>
Subject [GitHub] metamodel pull request #153: Collections instead of Arrays
Date Fri, 28 Jul 2017 11:58:31 GMT
Github user LosD commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/153#discussion_r130070891
  
    --- Diff: core/src/main/java/org/apache/metamodel/data/AbstractRowBuilder.java ---
    @@ -68,7 +71,7 @@ public AbstractRowBuilder(Column[] columns) {
     
         @Override
         public final Row toRow() {
    -        return new DefaultRow(new SimpleDataSetHeader(_columns), _values);
    +        return new DefaultRow(new SimpleDataSetHeader(Arrays.stream(_columns).map(SelectItem::new).collect(Collectors.toList())),
_values);
    --- End diff --
    
    Looks like it might be an advantage to make `_columns` a list here, instead. Of course
that means a whole lot more changes in the class, so it certainly also makes sense not to.


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