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

na.fill() should not change the data type of column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.3.1, 1.4.1, 1.5.2, 1.6.3, 2.0.2, 2.1.0, 2.2.0
    • None
    • SQL
    • None

    Description

      When these function are called, a column of numeric type will be converted into DoubleType, which will cause unexpected type casting and also precision loss for LongType.

      def fill(value: Double)
      def fill(value: Double, cols: Array[String])
      def fill(value: Double, cols: Seq[String])
      

      Workaround

      fill(Map("name" -> v))
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              davies Davies Liu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: