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

Add metadata field to StructField

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • MLlib, SQL
    • None

    Description

      Want to add a metadata field to StructField that can be used by other applications like ML to embed more information about the column.

      case class case class StructField(name: String, dataType: DataType, nullable: Boolean, metadata: Map[String, Any] = Map.empty)
      

      For ML, we can store feature information like categorical/continuous, number categories, category-to-index map, etc.

      One question is how to carry over the metadata in query execution. For example:

      val features = schemaRDD.select('features)
      val featuresDesc = features.schema('features).metadata
      

      Attachments

        Issue Links

          Activity

            People

              mengxr Xiangrui Meng
              mengxr Xiangrui Meng
              Michael Armbrust Michael Armbrust
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: