update chenghao's suggestion

should use "{}" for temp += 1 in a new line

val (maxKeyStreamedTable, mainStreamedTable) = streamedTable.partition(row => {
  streamSideKeyGenerator(row).toString().equals(maxrowKey.toString())
})