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

ParquetConversions fails to replace the destination MetastoreRelation of an InsertIntoTable node to ParquetRelation2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 1.3.0
    • SQL
    • None

    Description

      import sqlContext._
      sql("drop table if exists test")
      
      val df1 = sqlContext.jsonRDD(sc.parallelize((1 to 10).map(i => s"""{"a":$i}""")))
      df1.registerTempTable("jt")
      sql("create table test (a bigint) stored as parquet ")
      
      sql("explain insert into table test select a from jt").collect.foreach(println)
      

      The plan will be

      [== Physical Plan ==]
      [InsertIntoHiveTable (MetastoreRelation default, test, None), Map(), false]
      [ PhysicalRDD [a#34L], MapPartitionsRDD[17] at map at JsonRDD.scala:41]
      

      However, the write path should be converted to our own data source path.

      Attachments

        Activity

          People

            yhuai Yin Huai
            yhuai Yin Huai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: