title: About a loss of precision when calculating an aggregate sum with data frames
body: <p>i have a Dataframe with this kind of data:</p>
  
  <pre><code>unit,sensitivity currency,trading desk  ,portfolio       ,issuer        ,bucket ,underlying ,delta        ,converted sensitivity
  ES  ,USD                 ,EQ DERIVATIVES,ESEQRED_LH_MIDX ,5GOY          ,5      ,repo       ,0.00002      ,0.00002
  ES  ,USD                 ,EQ DERIVATIVES,IND_GLOBAL1     ,no_localizado ,8      ,repo       ,-0.16962     ,-0.15198
  ES  ,EUR                 ,EQ DERIVATIVES,ESEQ_UKFLOWN    ,IGN2          ,8      ,repo       ,-0.00253     ,-0.00253
  ES  ,USD                 ,EQ DERIVATIVES,BASKETS1        ,9YFV          ,5      ,spot       ,-1003.64501  ,-899.24586
  </code></pre>
  
  <p>and I have to do an aggregation operation over this data, doing something like this:</p>
  
  <pre><code>val filteredDF = myDF.filter("unit = 'ES' AND `trading desk` = 'EQ DERIVATIVES' AND issuer = '5GOY' AND bucket = 5 AND underlying = 'repo' AND portfolio ='ESEQRED_LH_MIDX'")
                       .groupBy("unit","trading desk","portfolio","issuer","bucket","underlying")
                       .agg(sum("converted_sensitivity"))
  </code></pre>
  
  <p>But I am seeing that I am loosing precision on the aggregated sum, so how can I be sure about that every value of "converted_sensitivity" is converted to a BigDecimal(25,5) before doing the sum operation over the new aggregated column?</p>
  
  <p>Thank you very much.</p>