You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by James Heather <ja...@mendeley.com> on 2015/10/06 12:23:14 UTC

Pull request for fix for PHOENIX-2257

@JT/Maryann:

I've submitted a pull request for fixing a test 
(DerivedTableIT.testDerivedTableWithGroupBy()), which passed on Java 7 
but not on Java 8.

The test was retrieving two rows from a query with no ORDER BY clause, 
and assuming that they would come back in a specific order. This 
happened to match the order that Java 7 returned them in, but the order 
has changed in Java 8.

Test fixed by not assuming any particular order.

It may be that there are other existing tests around that are doing 
something similar. Obviously anything that returns 0 rows or 1 row will 
not be a problem, but any test that runs a query that returns multiple 
rows, and relies on a specific return order without specifying an ORDER 
BY clause, is fragile.

(It would be possible to fix by adding an ORDER BY clause instead, of 
course, but that would change what's being tested, which might or might 
not be acceptable.)

I also converted a field to a local variable (since it was used only in 
one place), and let IntelliJ clean up the import statements. Hopefully 
that's not a problem.

James