转载:http://ddrv.cn/a/248617
两者等价,可看作把sql语句直接拿来使用
df1
.selectExpr
("*","(DEST_COUNTRY_NAME = ORIGIN_COUNTRY_NAME) as withincountry").show(5)
spark
.sql("select * ,
(DEST_COUNTRY_NAME = ORIGIN_COUNTRY_NAME) as withincountry from dfTable limit 5")
转载请注明原文地址:https://blackberry.8miu.com/read-1642.html