This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new d49a4caa2d docs: Add doc example of specifying broadcast hint in SQL
(#2572)
d49a4caa2d is described below
commit d49a4caa2ddc2088785a9157a4feded5a4cbd4fa
Author: Peter Nguyen <[email protected]>
AuthorDate: Thu Dec 25 00:12:43 2025 -0800
docs: Add doc example of specifying broadcast hint in SQL (#2572)
---
docs/api/sql/Optimizer.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/docs/api/sql/Optimizer.md b/docs/api/sql/Optimizer.md
index ca14054b1e..0a83aca1f8 100644
--- a/docs/api/sql/Optimizer.md
+++ b/docs/api/sql/Optimizer.md
@@ -211,6 +211,17 @@ The supported join type - broadcast side combinations are:
pointDf.alias("pointDf").join(broadcast(polygonDf).alias("polygonDf"),
expr("ST_Contains(polygonDf.polygonshape, pointDf.pointshape)"))
```
+To specify a broadcast hint in SQL, use the following syntax:
+
+```sql
+SELECT /*+ BROADCAST(polygonDf) */
+ pointDf.*,
+ polygonDf.*
+FROM pointDf
+JOIN polygonDf
+ ON ST_Contains(polygonDf.polygonshape, pointDf.pointshape);
+```
+
Spark SQL Physical plan:
```