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

Returned an Empty Result after Loading a Hive Table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.1.0
    • 2.1.1, 2.2.0
    • SQL

    Description

              sql(
                """
                  |CREATE TABLE test (a STRING)
                  |STORED AS PARQUET
                """.stripMargin)
      
             spark.table("test").show()
      
              sql(
                s"""
                   |LOAD DATA LOCAL INPATH '$newPartitionDir' OVERWRITE
                   |INTO TABLE test
                 """.stripMargin)
      
              spark.table("test").show()
      

      The returned result is empty after table loading. We should refresh the metadata cache after loading the data to the table.

      Attachments

        Activity

          People

            smilegator Xiao Li
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: