The tests are passing.

I will write some non end-to-end tests in the next iteration.

TODO items:
* the MetaDataResultSet you mentioned before;
* select upsert.

On 03/12/2013 02:23 PM, James Taylor wrote:
>
> In 
> src/test/java/com/salesforce/phoenix/arithmatic/ArithmeticOperationTest.java:
>
> >              stmt = conn.prepareStatement(query);
> >              ResultSet rs = stmt.executeQuery();
> >              assertTrue(rs.next());
> > -            assertEquals(new BigDecimal("123456789.123456789"), rs.getBigDecimal(1));
> > -            assertEquals(new BigDecimal("123.45"), rs.getBigDecimal(2));
> > -            assertEquals(new BigDecimal("1234.5"), rs.getBigDecimal(3));
> > +            assertEquals(new BigDecimal("123456789123456789"), rs.getBigDecimal(1));
> > +            assertEquals(new BigDecimal("12345"), rs.getBigDecimal(2));
> > +            assertEquals(new BigDecimal("12.34"), rs.getBigDecimal(3));
> > +            assertFalse(rs.next());
> > +
> > +            query = "UPSERT INTO testDecimalArithmatic(pk, col1, col2, col3) VALUES(?,?,?,?)";
> > +            stmt = conn.prepareStatement(query);
> > +            stmt.setString(1, "valueTwo");
> > +            stmt.setBigDecimal(2, new BigDecimal("1234567890123456789012345678901.12345"));
>
> Changes look good. Do all existing tests pass?
>
> In your follow up change, I think it'd be good to have unit tests (not 
> end2end ones), that instantiate and use the Decimal arithmetic 
> expressions directly so we get better test coverage. Plus they'll run 
> faster too.
>
> What's left to get in? Is this accurate:
>
>   * throw instead of return null for error conditions
>   * use precision/scale for aggregate functions (AVG, SUM, MIN/MAX?).
>     I think it's probably ok to set this at the very end of the
>     function - this would be in AvgAggregateFunction,
>     SumAggregationFunction, etc. Can you see how Oracle deals with
>     this with a few tests (whether it sets the scale only at the end).
>     Not sure if anything is required for MIN and MAX.
>   * add more tests as described above
>
> Anything else?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/forcedotcom/phoenix/pull/90/files#r3344072>.
>