From issues-return-260824-archive-asf-public=cust-asf.ponee.io@spark.apache.org Wed Aug 5 18:43:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 4546618064D for ; Wed, 5 Aug 2020 20:43:03 +0200 (CEST) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 61C29124941 for ; Wed, 5 Aug 2020 18:43:02 +0000 (UTC) Received: (qmail 56973 invoked by uid 500); 5 Aug 2020 18:43:02 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 56956 invoked by uid 99); 5 Aug 2020 18:43:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2020 18:43:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 65ABA435A0 for ; Wed, 5 Aug 2020 18:43:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 37CD7780856 for ; Wed, 5 Aug 2020 18:43:00 +0000 (UTC) Date: Wed, 5 Aug 2020 18:43:00 +0000 (UTC) From: "Jayce Jiang (Jira)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (SPARK-32515) Distinct Function Weird Bug MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-32515?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D171= 71682#comment-17171682 ]=20 Jayce Jiang edited comment on SPARK-32515 at 8/5/20, 6:42 PM: -------------------------------------------------------------- Okay, The expect results is what is I show in the filter_df.toPandas()["username"= ].unique. The result was all usernames are all in the correct format, the username co= lumns only contain characters [a-z][A-Z][0-9] and the underscore. !unknown= .png|width=3D631,height=3D251! For example, "danielrainge", "dgreen_14". =C2=A0 The problem is when I use spark function instead of converting to a pandas = dataframe first. As you see in the image. In [134], when I do the collect()= method, I am getting result string like=C2=A0[["#classic"|#classic"]] , an= d random result with bracket [], those result shouldn't be there, all the s= tring in the username column does not contain bracket or hashtags #.=C2=A0 !unknown1.png|width=3D576,height=3D272! I am trying it in google colab right now, and see if it is a Jupyter notebo= ok problem. Will keep you updated =C2=A0 was (Author: tigaiii123): Okay, The expect results is what is I show in the filter_df.toPandas()["username"= ].unique. The result was all usernames are all in the correct format, the username co= lumns only contain characters [a-z][A-Z][0-9] and the underscore. !unknown.= png|width=3D631,height=3D251! y. For example, "danielrainge", "dgreen_14", > Distinct Function Weird Bug > --------------------------- > > Key: SPARK-32515 > URL: https://issues.apache.org/jira/browse/SPARK-32515 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.4.6 > Environment: Window 10 and Mac, both have the same issues. > Using Scala version 2.11.12 > Python 3.6.10 > java version "1.8.0_261" > Reporter: Jayce Jiang > Priority: Major > Attachments: Capture.PNG, Capture1.png, Capture2.PNG, image-2020-= 08-03-07-03-55-716.png, unknown.png, unknown1.png, unknown2.png > > > A weird spark display and counting error. When I was loading in my CSV fi= le into spark and trying to do check all distinct value from a column insid= e of a dataframe. Everything I try in spark resulted in a wrong answer. But= if I convert my spark dataframe into pandas dataframe, it works. Please he= lp. This bug only happens in this one CSV file, all my other CSV files work= properly. Here are the pictures. > =C2=A0 > !image-2020-08-01-21-19-06-402.png!!image-2020-08-01-21-19-03-289.png!!im= age-2020-08-01-21-18-58-625.png! -- 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