df_eximo_r_01.show()
+-----------+----------+---------+
|ID_DOSSIER1|ID_ENTITE1|DT_DEBUT1|
+-----------+----------+---------+
| NULL| NULL| NULL|
+-----------+----------+---------+
When I execute this simple instruction it works:
df_eximo_r_01.foreach(x => for(i <- 0 to 2){if(x(i) == ("NULL")) println("Bonjour") })
//Bonjour
//Bonjour
//Bonjour
But when I try to increment a sequence using the same condition it doesn't add any lines to df_rejet:
df_eximo_r_01.foreach(x => for(i <- 0 to 2){
if(x(i) == ("NULL"))
df_rejet = df_rejet :+(Rejet_Format("DWG_OF_EXIMO","INSERT",DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss").format(LocalDateTime.now),"R01","ID_DOSSIER","ID_ENTITE"))
})