Spark SQL“<=>"操作员 [英] Spark SQL &quot;&lt;=&gt;&quot; operator

查看:32
本文介绍了Spark SQL“<=>"操作员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在 Scala Spark 项目中遇到了这个运算符:<=>".我无法找到有关它的任何文档.有谁知道它是如何工作的,或者知道一些文档吗?

I recently came across this operator: "<=>" in a Scala Spark project. I am having trouble finding any documentation on it. Does any know how it works, or know of some documentation?

我相信它与相等运算有关.

I believe it has something to with equality operations.

谢谢

观察 1 (2/12/2020) |火花 2.3.2我做了一些实验,并注意到使用<=>"对并置数据执行连接会导致随机播放,而=="不会.

Observation 1 (2/12/2020) | Spark 2.3.2 I have done some experimentation and noticed that performing joins on co-located data with "<=>" causes a shuffle to happen, while "==" does not.

推荐答案

查看Spark SQL 编程指南中支持的 Hive 功能"部分 link 你会在 Spark 支持的 Hive Operators 列表中找到它.

Checkout the Section "Supported Hive Feature on Spark SQL Programming guide link and you will find it in the list of Hive Operators supported by Spark.

这是它的作用:

  • 对于非空操作数,使用 EQUAL(=) 运算符返回相同的结果

然而:

  • 如果两者都为NULL则返回TRUE

  • it returns TRUE if both are NULL

如果其中一个为NULL则返回FALSE

it returns FALSE if one of them is NULL

这篇关于Spark SQL“<=>"操作员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆