I tried on Derby and this is its behavior too. In this case, if the 
numeric value has 3 decimal points and the scale is limited to 2, then 
it won't fit it. It is shown in one of the test case.

On 03/05/2013 03:04 PM, James Taylor wrote:
>
> In src/main/java/com/salesforce/phoenix/schema/PColumnImpl.java:
>
> >      @Override
> >      public int getPosition() {
> >          return position;
> >      }
> >
> >      @Override
> > +    public boolean isCompatibleWith(Expression expr) {
> > +        switch (getDataType()) {
> > +            case DECIMAL: // Need to check precision and scale on decimal.
> > +
> > +                Integer desiredPrecision = expr.getMaxLength();
> > +                Integer desiredScale = expr.getScale();
> > +                if (desiredPrecision == null && desiredScale == null)
> > +                    break;
> > +                if (getMaxLength() < desiredPrecision) {
> > +                    return false;
> > +                }
> > +                if (getScale() < desiredScale) {
> > +                    return false;
>
> It makes sense for the maxLength < desiredPrecision to be an error, 
> but with scale, does the sql spec say this is an error? I'd think you 
> could just use the scale and those decimal places would be zero, no?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/forcedotcom/phoenix/pull/79/files#r3253106>.
>