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

Support merge schema for ORC

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.3, 2.0.0, 2.1.1, 2.2.0, 2.3.4, 2.4.5
    • 3.0.0
    • SQL
    • None

    Description

      when I tried to load partitioned orc files with a slight difference in a nested column. say
      column
      – request: struct (nullable = true)

        – datetime: string (nullable = true)
        – host: string (nullable = true)
        – ip: string (nullable = true)
        – referer: string (nullable = true)
        – request_uri: string (nullable = true)
        – uri: string (nullable = true)
        – useragent: string (nullable = true)
      And then there's a page_url_lists attributes in the later partitions.

      I tried to use
      val s = sqlContext.read.format("orc").option("mergeSchema", "true").load("/data/warehouse/xxxx") to load the data.
      But the schema doesn't show request.page_url_lists.
      I am wondering if schema merge doesn't work for orc?

      Attachments

        Issue Links

          Activity

            People

              EdisonWang EdisonWang
              dzhao11 Dave
              Votes:
              7 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: