Description
The hint of the plan segment is lost, if the plan segment is replaced by the cached data.
val df1 = spark.createDataFrame(Seq((1, "4"), (2, "2"))).toDF("key", "value") val df2 = spark.createDataFrame(Seq((1, "1"), (2, "2"))).toDF("key", "value") df2.cache() val df3 = df1.join(broadcast(df2), Seq("key"), "inner")
Hint is lost in df3. The physical join algorithm will not respect the hint due to the loss.