You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Rohit Chaddha <ro...@gmail.com> on 2016/07/31 14:16:01 UTC
calling dataset.show on a custom object - displays toString() value
as first column and blank for rest
I have a custom object called A and corresponding Dataset<A>
when I call datasetA.show() method i get the following
+--------------------+----+-----+---------+-------+
| id|da|like|values|uid|
+--------------------+----+-----+---------+-------+
|A.toString()...|
|A.toString()...|
|A.toString()...|
|A.toString()...|
|A.toString()...|
|A.toString()...|
that is A.toString() is called and displayed as value of the first column
and rest all columns are blank
Any suggestions what should be done to fix this ?
- Rohit
Re: calling dataset.show on a custom object - displays toString()
value as first column and blank for rest
Posted by Jacek Laskowski <ja...@japila.pl>.
On Sun, Jul 31, 2016 at 4:16 PM, Rohit Chaddha
<ro...@gmail.com> wrote:
> I have a custom object called A and corresponding Dataset<A>
>
> when I call datasetA.show() method i get the following
How do you create datasetA? How does A look like?
Jacek
---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org
Re: calling dataset.show on a custom object - displays toString()
value as first column and blank for rest
Posted by Michael Armbrust <mi...@databricks.com>.
Can you share you code? This does not happen for me
<https://databricks-prod-cloudfront.cloud.databricks.com/public/4027ec902e239c93eaaa8714f173bcfc/1023043053387187/3844103335236511/2840265927289860/latest.html>
.
On Sun, Jul 31, 2016 at 7:16 AM, Rohit Chaddha <ro...@gmail.com>
wrote:
> I have a custom object called A and corresponding Dataset<A>
>
> when I call datasetA.show() method i get the following
>
> +--------------------+----+-----+---------+-------+
> | id|da|like|values|uid|
> +--------------------+----+-----+---------+-------+
> |A.toString()...|
> |A.toString()...|
> |A.toString()...|
> |A.toString()...|
> |A.toString()...|
> |A.toString()...|
>
> that is A.toString() is called and displayed as value of the first column
> and rest all columns are blank
>
> Any suggestions what should be done to fix this ?
>
> - Rohit
>