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

[jira] [Updated] (SPARK-36003) Implement unary operator `invert` of integral ps.Series/Index

     [ https://issues.apache.org/jira/browse/SPARK-36003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xinrong Meng updated SPARK-36003:
---------------------------------
    Description: 
 
{code:java}
>>> ~ps.Series([1, 2, 3])
Traceback (most recent call last):
...
pyspark.sql.utils.AnalysisException: cannot resolve '(NOT `0`)' due to data type mismatch: argument 1 requires boolean type, however, '`0`' is of bigint type.;
'Project [unresolvedalias(NOT 0#1L, Some(org.apache.spark.sql.Column$$Lambda$1365/2097273578@53165e1))]
+- Project [__index_level_0__#0L, 0#1L, monotonically_increasing_id() AS __natural_order__#4L]
 +- LogicalRDD [__index_level_0__#0L, 0#1L], false
{code}
 

 Currently, unary operator `invert` of integral ps.Series/Index is not supported. We ought to implement that following pandas' behaviors.

  was:
 
{code:java}
>>> ~ps.Series([1, 2, 3])
Traceback (most recent call last):
...
pyspark.sql.utils.AnalysisException: cannot resolve '(NOT `0`)' due to data type mismatch: argument 1 requires boolean type, however, '`0`' is of bigint type.;
'Project [unresolvedalias(NOT 0#1L, Some(org.apache.spark.sql.Column$$Lambda$1365/2097273578@53165e1))]
+- Project [__index_level_0__#0L, 0#1L, monotonically_increasing_id() AS __natural_order__#4L]
 +- LogicalRDD [__index_level_0__#0L, 0#1L], false
{code}
 

 Currently, unary operator `invert` of numeric ps.Series/Index is not supported. We ought to implement that following pandas' behaviors.


> Implement unary operator `invert` of integral ps.Series/Index
> -------------------------------------------------------------
>
>                 Key: SPARK-36003
>                 URL: https://issues.apache.org/jira/browse/SPARK-36003
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark
>    Affects Versions: 3.2.0
>            Reporter: Xinrong Meng
>            Priority: Major
>
>  
> {code:java}
> >>> ~ps.Series([1, 2, 3])
> Traceback (most recent call last):
> ...
> pyspark.sql.utils.AnalysisException: cannot resolve '(NOT `0`)' due to data type mismatch: argument 1 requires boolean type, however, '`0`' is of bigint type.;
> 'Project [unresolvedalias(NOT 0#1L, Some(org.apache.spark.sql.Column$$Lambda$1365/2097273578@53165e1))]
> +- Project [__index_level_0__#0L, 0#1L, monotonically_increasing_id() AS __natural_order__#4L]
>  +- LogicalRDD [__index_level_0__#0L, 0#1L], false
> {code}
>  
>  Currently, unary operator `invert` of integral ps.Series/Index is not supported. We ought to implement that following pandas' behaviors.



--
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