hint 说明

spark.sql(
    "select /*+ mapjoin(b)  */ "
    "* from t1 a left join t2 b on a.id=b.id"
).explain()

1:当表有别名时,需要hint的是表的别名;
2:hint的关键字(例如本例中的:mapjoin),大小写都可以识别。

 

posted @ 2021-01-06 11:31  muyue123  阅读(128)  评论(0编辑  收藏  举报