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

Add metadata field to StructField

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: MLlib, SQL
    • Labels:
      None
    • Target Version/s:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: