Not sure about Oracle. Will look it up.

On 03/05/2013 03:29 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;
>
> I see. I was thinking of when it had more room than it needed. I guess 
> that makes sense. Does Oracle give an error too? Seems like folks 
> would want a mode that rounds or truncates.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/forcedotcom/phoenix/pull/79/files#r3253462>.
>