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

Harish edited comment on SPARK-17908 at 10/13/16 4:17 PM:
----------------------------------------------------------

Sorry.. I didnt put the actual column names of my code in stack trace, i have 
modified the first line of stack trace for the column names. I am confirming  i 
can see the column name in the columns list eg: key2#20202   missing from 
key2#20202, key1#key2#23723, key3#20342 etc


was (Author: harishk15):
Sorry.. I didnt put the actual column names of my code in stack trace, i have 
modified the first line of stack trace for the column names.

> Column names Corrupted in pysaprk dataframe groupBy
> ---------------------------------------------------
>
>                 Key: SPARK-17908
>                 URL: https://issues.apache.org/jira/browse/SPARK-17908
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 1.6.0, 1.6.1, 1.6.2, 2.0.0, 2.0.1
>            Reporter: Harish
>            Priority: Minor
>
> I have DF say df
> df1= df.groupBy('key1', 'key2', 
> 'key3').agg(func.count(func.col('val')).alias('total'))
> df3 =df.join(df1, ['key1', 'key2', 'key3'])\
>              .withcolumn('newcol', func.col('val')/func.col('total'))
> I am getting key2 is not present in df1, which is not truw becuase df1.show 
> () is having the data with the key2.
> Then i added this code  before join-- df1 = df1.columnRenamed('key2', 'key2') 
> renamed with same name. Then it works.
> Stack trace will say column missing, but it is npt.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to