String query = ("A=LOAD 'input1' AS (a0, a1, a2);"+
"B = group A by $0;"+
"C = foreach B { D = distinct A; generate group, D;};"+
"store C into 'output';");
SecondaryKeyOptimizer so = visitSecondaryKeyOptimizer(query);
assertEquals(1, so.getNumUseSecondaryKey());
assertEquals(0, so.getNumSortRemoved());
assertEquals(1, so.getNumDistinctChanged());
}