diff --git a/docs/sql-performance-tuning.md b/docs/sql-performance-tuning.md index 25c22d660562..ccf7e853b40d 100644 --- a/docs/sql-performance-tuning.md +++ b/docs/sql-performance-tuning.md @@ -176,48 +176,33 @@ Note that there is no guarantee that Spark will choose the join strategy specifi a specific strategy may not support all join types.
- -
- -{% highlight python %} +
+```python spark.table("src").join(spark.table("records").hint("broadcast"), "key").show() -{% endhighlight %} - +```
- -
- -{% highlight scala %} +
+```scala spark.table("src").join(spark.table("records").hint("broadcast"), "key").show() -{% endhighlight %} - +```
- -
- -{% highlight java %} +
+```java spark.table("src").join(spark.table("records").hint("broadcast"), "key").show(); -{% endhighlight %} - +```
- -
- -{% highlight r %} +
+```r src <- sql("SELECT * FROM src") records <- sql("SELECT * FROM records") head(join(src, hint(records, "broadcast"), src$key == records$key)) -{% endhighlight %} - +```
- -
- -{% highlight sql %} +
+```sql -- We accept BROADCAST, BROADCASTJOIN and MAPJOIN for broadcast hint SELECT /*+ BROADCAST(r) */ * FROM records r JOIN src s ON r.key = s.key -{% endhighlight %} - +```