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

DataFrame.withColumn should take metadata

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.3.0
    • None
    • SQL
    • None

    Description

      It would be nice if DataFrame.withColumn could take metadata. Currently (as far as I can tell), the best way to specify it is:

      dataset.withColumn(columnName, newCol.as(columnName, myMetadata))
      

      where "newCol" is a new column (in my use case, a column created by a UDF).

      This is weird since the columnName is specified twice.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              josephkb Joseph K. Bradley
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: