title: value _2 is not a member of Double spark-shell
body: <p>I am getting an error while implementing aggregateByKey in spark-scala-shell.</p>
  
  <p>The piece of code that I am trying to execute on Scala-shell is this,</p>
  
  <pre><code>val orderItemsMapJoinOrdersMapMapAgg = orderItemsMapJoinOrdersMapMap
    .aggregateByKey(0.0,0)(
        (a,b) =&gt; (a._1 + b , a._2 + 1),
        (a,b) =&gt; (a._1 + b._1 , a._2 + b._2 )
    )
  </code></pre>
  
  <p>But I am getting the following error,</p>
  
  <pre><code>&lt;console&gt;:39: error: value _1 is not a member of Double
           val orderItemsMapJoinOrdersMapMapAgg = orderItemsMapJoinOrdersMapMap.aggregateByKey( 0.0,0)( (a,b) =&gt; (a._1 + b , a._2 +1), (a,b) =&gt; (a._1 + b._1 , a._2 + b._2 ))
  
  
  scala&gt; orderItemsMapJoinOrdersMapMap
  res8: org.apache.spark.rdd.RDD[(String, Float)] = MapPartitionsRDD[16] at map at &lt;console&gt;:37
  </code></pre>
  
  <p>Can  someone help me in understanding double and Float value logic and how to fix it </p>