You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mrql.apache.org by "JC (JIRA)" <ji...@apache.org> on 2017/02/02 21:43:51 UTC
[jira] [Created] (MRQL-102) A suspicious use of an incrementer in a
for loop
JC created MRQL-102:
-----------------------
Summary: 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
{cpde: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)