Spark SQL“< =>"操作员 [英] Spark SQL "<=>" operator

查看:176
本文介绍了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)| Spark 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功能"部分

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“&lt; =&gt;"操作员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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