pyspark.sql.DataFrame.hint

DataFrame.hint(name: str, *parameters: Union[PrimitiveType, List[PrimitiveType]]) → DataFrame

Specifies some hint on the current DataFrame.

Parameters
namestr

A name of the hint.

parametersstr, list, float or int

Optional parameters.

Returns
DataFrame

Examples

>>> df.join(df2.hint("broadcast"), "name").show()
+----+---+------+
|name|age|height|
+----+---+------+
| Bob|  5|    85|
+----+---+------+