You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Andrea Viano (Jira)" <ji...@apache.org> on 2020/10/10 09:56:00 UTC
[jira] [Updated] (SPARK-33110) array_contains doesn't pick element
in the array but just at the end
[ https://issues.apache.org/jira/browse/SPARK-33110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrea Viano updated SPARK-33110:
---------------------------------
Attachment: beer2.PNG
beer1.PNG
beer0.PNG
> array_contains doesn't pick element in the array but just at the end
> --------------------------------------------------------------------
>
> Key: SPARK-33110
> URL: https://issues.apache.org/jira/browse/SPARK-33110
> Project: Spark
> Issue Type: Bug
> Components: ML
> Affects Versions: 2.4.7, 3.0.1
> Environment: Windows 10
> Python 3.7.4
> Java JDK 8
> hadoop 3.0.1
> Reporter: Andrea Viano
> Priority: Blocker
> Attachments: beer0.PNG, beer1.PNG, beer2.PNG
>
>
> Hello,
> given a column of array of strings. I used array_contains to find all the array with the string "Beer". array_contains is recognise just the string "Beer" if it is at the end of the array but not if it is in the middle of the array.
> beer=rep_trans_count.withColumn("keep", array_contains(rep_trans_count.TRANSACTIONSLIST,"Beer")).filter(col("keep")==True)
>
>
--
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