You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mrql.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/02/04 15:16:51 UTC
[jira] [Commented] (MRQL-102) A suspicious use of an incrementer in
a for loop
[ https://issues.apache.org/jira/browse/MRQL-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852820#comment-15852820 ]
ASF GitHub Bot commented on MRQL-102:
-------------------------------------
GitHub user fegaras opened a pull request:
https://github.com/apache/incubator-mrql/pull/34
[MRQL-102] A suspicious use of an incrementer in a for loop
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/fegaras/incubator-mrql MRQL-102
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-mrql/pull/34.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #34
----
commit e6cdaf358bd11df153596bced091bd9dde3f4191
Author: Leonidas Fegaras <fe...@cse.uta.edu>
Date: 2017-02-04T15:15:09Z
[MRQL-102] A suspicious use of an incrementer in a for loop
----
> A suspicious use of an incrementer in a for loop
> ------------------------------------------------
>
> Key: MRQL-102
> URL: https://issues.apache.org/jira/browse/MRQL-102
> Project: MRQL
> Issue Type: Bug
> Reporter: JC
> Priority: Trivial
>
> In a recent github snapshot, I've found a suspicious use of an incrementer in a for loop.
> core/src/main/java/org/apache/mrql/MapReduceAlgebra.java
> {code:java}
> 653 for ( int i = 0; i < num; i++ ) {
> 654 Tuple d = (Tuple)loop.eval(s);
> 655 for ( int j = 0; j < d.size(); j++ )
> 656 if (d.get(j) instanceof Bag) {
> 657 s.set(j,d.get(i));
> 658 ((Bag)d.get(j)).materialize();
> 659 } else if (d.get(j) instanceof MR_dataset) {
> 660 DataSet ds = ((MR_dataset)d.get(j)).dataset();
> 661 s.set(j,Plan.collect(ds));
> 662 } else throw new Error("Wrong loop");
> 663 };
> {code}
> In Line 657, could get(i ) be get(j)? Since I don't have domain knowledge about this project, I'd like to report this just in case.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)