Hi community,
I try to apply the function below during a flatMapValues or a map but I
get a nullPointerException with the plusDays(1). What did I miss ?
def allDates(dateSeq: Seq[DateTime], dateEnd: DateTime): Seq[DateTime] = {
if (dateSeq.last.isBefore(dateEnd)){
allDates(dateSeq:+ dateSeq.last.plusDays(1), dateEnd)
} else {
dateSeq
}
}
val videoAllDates = .select("player_id", "mindate").flatMapValues(
minDate => allDates(Seq(minDate), endDate))
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org