You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2017/03/19 13:40:41 UTC

[jira] [Updated] (SPARK-20018) Pivot with timestamp and count should not print internal representation

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

Hyukjin Kwon updated SPARK-20018:
---------------------------------
    Description: 
Currently, when we perform count with timestamp types, it prints the internal representation as the column name as below:

{code}
scala> Seq(new java.sql.Timestamp(1)).toDF("a").groupBy("a").pivot("a").count().show()
+--------------------+----+
|                   a|1000|
+--------------------+----+
|1969-12-31 16:00:...|   1|
+--------------------+----+
{code}

It seems this should be 

{code}
+--------------------+-----------------------+
|                   a|1969-12-31 16:00:00.001|
+--------------------+-----------------------+
|1969-12-31 16:00:...|                      1|
+--------------------+-----------------------+
{code}


  was:
Currently, when we perform count with timestamp types, it prints the internal representation as the column name as below:

{code}
scala> Seq(new java.sql.Timestamp(1)).toDF("a").groupBy("a").pivot("a").count().show()
+--------------------+----+
|                   a|1000|
+--------------------+----+
|1969-12-31 16:00:...|   1|
+--------------------+----+
{code}

It seems this should be 

{code}
Testing started at PM 10:30 ...
+--------------------+-----------------------+
|                   a|1969-12-31 16:00:00.001|
+--------------------+-----------------------+
|1969-12-31 16:00:...|                      1|
+--------------------+-----------------------+
{code}



> Pivot with timestamp and count should not print internal representation
> -----------------------------------------------------------------------
>
>                 Key: SPARK-20018
>                 URL: https://issues.apache.org/jira/browse/SPARK-20018
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Hyukjin Kwon
>            Priority: Minor
>
> Currently, when we perform count with timestamp types, it prints the internal representation as the column name as below:
> {code}
> scala> Seq(new java.sql.Timestamp(1)).toDF("a").groupBy("a").pivot("a").count().show()
> +--------------------+----+
> |                   a|1000|
> +--------------------+----+
> |1969-12-31 16:00:...|   1|
> +--------------------+----+
> {code}
> It seems this should be 
> {code}
> +--------------------+-----------------------+
> |                   a|1969-12-31 16:00:00.001|
> +--------------------+-----------------------+
> |1969-12-31 16:00:...|                      1|
> +--------------------+-----------------------+
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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