You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/07/23 17:37:00 UTC

[jira] [Commented] (SPARK-36274) Fix equality comparison of unordered Categoricals

    [ https://issues.apache.org/jira/browse/SPARK-36274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17386416#comment-17386416 ] 

Apache Spark commented on SPARK-36274:
--------------------------------------

User 'xinrong-databricks' has created a pull request for this issue:
https://github.com/apache/spark/pull/33497

> Fix equality comparison of unordered Categoricals
> -------------------------------------------------
>
>                 Key: SPARK-36274
>                 URL: https://issues.apache.org/jira/browse/SPARK-36274
>             Project: Spark
>          Issue Type: Sub-task
>          Components: PySpark
>    Affects Versions: 3.2.0
>            Reporter: Xinrong Meng
>            Priority: Major
>
> We cannot rely on codes when compare equality of unordered Categoricals.
> An example looks like
> {code:java}
> >>> (ps.Series(pd.Categorical(list('abca'))) == ps.Series(pd.Categorical(list('bcaa'), categories=list('bca')))).sort_index()
> 0     True
> 1     True
> 2     True
> 3    False
> dtype: bool
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org