Apache Spark:RDD或DF中的行比较有多深

发布于 2025-02-11 08:54:56 字数 71 浏览 1 评论 0原文

我想了解df.intersect()的行为。

因此,问题想到了,尤其是当我们拥有复杂的行具有复杂字段时。 (深树)

I want to understand the behavior of DF.intersect().

so the question came to mind, especially when we have complex Rows having complex fields. (deep tree)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水染的天色ゝ 2025-02-18 08:54:56

如果我们在谈论dataframe Intersect转换,那么,根据数据集 and source ,比较直接在编码内容上进行。这尽可能深入。

def Intersect(其他:dataset [t]):数据集[t]
返回一个新数据集
仅在此数据集和另一个数据集中包含行。这是
等效于SQL中的相交。

从那以后
1.6.0

注意:平等检查直接在编码上执行
数据的表示形式,因此不受自定义等于的影响
在t。

上定义的函数

If we are talking about dataframe intersect transformation, then, according to the Dataset documentation and source, the comparison is done directly on the encoded content. Which is as deep as it can possibly go.

def intersect(other: Dataset[T]): Dataset[T]
Returns a new Dataset
containing rows only in both this Dataset and another Dataset. This is
equivalent to INTERSECT in SQL.

Since
1.6.0

Note: Equality checking is performed directly on the encoded
representation of the data and thus is not affected by a custom equals
function defined on T.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文