cloud-fan commented on a change in pull request #23507: [SPARK-26576][SQL]
Broadcast hint not applied to partitioned table
URL: https://github.com/apache/spark/pull/23507#discussion_r246696889
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/PruneFileSourcePartitionsSuite.scala
##########
@@ -91,4 +92,16 @@ class PruneFileSourcePartitionsSuite extends QueryTest with
SQLTestUtils with Te
assert(size2 < tableStats.get.sizeInBytes)
}
}
+
+ test("SPARK-26576 Broadcast hint not applied to partitioned table") {
+ withTable("tbl") {
+ spark.range(10).selectExpr("id", "id % 3 as
p").write.partitionBy("p").saveAsTable("tbl")
+
+ val df = spark.table("tbl")
+ val hints = df.join(broadcast(df),
"p").queryExecution.optimizedPlan.collect {
Review comment:
can we check the physical plan to make sure BroadcastJoin is picked?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]