They are still accurate, I put down the actual logic here.


On 3/11/13 6:17 PM, "James Taylor" <notifications@github.com> wrote:

In src/test/java/com/salesforce/phoenix/arithmatic/ArithmeticOperationTest.java:
> +            query = "SELECT col2 * col3 FROM testDecimalArithmatic WHERE pk='testValueOne'";
> +            stmt = conn.prepareStatement(query);
> +            rs = stmt.executeQuery();
> +            assertTrue(rs.next());
> +            result = rs.getBigDecimal(1);
> +            assertEquals(new BigDecimal("1523990.25"), result);
> +            // col1 * col3 would be bad due to exceeding scale.
> +            query = "SELECT col1 * col3 FROM testDecimalArithmatic WHERE pk='testValueOne'";
> +            stmt = conn.prepareStatement(query);
> +            rs = stmt.executeQuery();
> +            assertTrue(rs.next());
> +            result = rs.getBigDecimal(1);
> +            assertNull(result); // Value too big.
> +
> +            // Division
> +            // result scale should be: 31 - lp + ls - rs
Is this still accurate?

-
Reply to this email directly or view it on GitHub <https://github.com/forcedotcom/phoenix/pull/90/files#r3328383> .