Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20018

Pivot with timestamp and count should not print internal representation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • SQL
    • None

    Description

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

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

      It seems this should be

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

      Attachments

        Activity

          People

            gurwls223 Hyukjin Kwon
            gurwls223 Hyukjin Kwon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: