Consider the below code,
Val df1 = sparkSession.read().json("abc.json")
Val df2 = df1.where("point > 200").limit(10)
df2.count()
My first question is, when the first line is evaluated and my data is read into df1? does that happen when count action is called?
My second question is, does the data that is saved to df1 will be available in df1 till the execution of program ends and I can use it to perform any other operations as well?
Ex - Val df3 = df1.where("point > 100")
df3.count()