This used to work :

// What's the min number of bids per item? what's the average? what's the
max?
auction.groupBy("item", "auctionid").count.agg(min("count"),
avg("count"),max("count")).show

// MIN(count) AVG(count)        MAX(count)
// 1  16.992025518341308 75

but this now gives an error

val res = auction.groupBy("item", "auctionid").count.agg(min("count"),
avg("count"),max("count"))

<console>:42: error: Float does not take parameters

val res = auction.groupBy("item", "auctionid").count.agg(min("count"),
avg("count"),max("count"))

min and max still work .

Do I need to cast the count to a float ?

auction.groupBy("item", "auctionid").count.agg(min("count"),
max("count")).show

MIN(count) MAX(count)
 1          75

Reply via email to