val maxValue = inputDF.rdd.reduce((row1, row2) => {
val value = math.max(row1.getAs[Double](0), row2.getAs[Double](0))
Row(value)
}).getAs[Double](0)