public Object evalExpValue(MTuple tuple, MExp exp) throws SQLException {

    Object o2 = null;

    if(exp instanceof MConstant) {

      MConstant c = (MConstant)exp;

      switch(c.getType()) {

        case MConstant.COLUMNNAME:

          Object o1 = tuple.getAttValue(c.getValue());
          if(o1 == null)
            throw new SQLException("MEval.evalExpValue(): unknown column "
             + c.getValue());
          try {
            o2 = new Double(o1.toString());
          } catch(NumberFormatException e) {
            o2 = o1;
          }
          break;

        case MConstant.NUMBER:
          o2 = new Double(c.getValue());
          break;

        case MConstant.STRING:
        default:
          o2 = c.getValue();
          break;
      }
    } else if(exp instanceof MExpression) {
      o2 = new Double(evalNumericExp(tuple, (MExpression)exp));
    }
    return o2;
  }