[
https://issues.apache.org/jira/browse/TAJO-2058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15108223#comment-15108223
]
ASF GitHub Bot commented on TAJO-2058:
--------------------------------------
Github user dkhwangbo commented on a diff in the pull request:
https://github.com/apache/tajo/pull/944#discussion_r50226906
--- Diff:
tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java ---
@@ -419,9 +420,7 @@ public Object clone() throws CloneNotSupportedException
{
hash.quantity = quantity;
if (specifiers != null) {
hash.specifiers = new ArrayList<>();
- for (PartitionSpecifier specifier : specifiers) {
- hash.specifiers.add(specifier);
- }
+
hash.specifiers.addAll(specifiers.stream().collect(Collectors.toList()));
--- End diff --
@eminency Thanks for your comment. I agree with your opinion.
I'll rewrite it overall correlated with a simple shallow copy.
> foreach loop can be collapsed with stream api
> ---------------------------------------------
>
> Key: TAJO-2058
> URL: https://issues.apache.org/jira/browse/TAJO-2058
> Project: Tajo
> Issue Type: Improvement
> Reporter: Dongkyu Hwangbo
> Assignee: Dongkyu Hwangbo
> Priority: Minor
> Labels: migration, stream
>
> Currently, TAJO has many foreach loop. To make project more stream-friendly,
> replacing this loop with stream api is needed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)