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

CatalogTable to HiveTable should not change the table's ownership

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.4, 2.4.4
    • 2.4.5, 3.0.0
    • SQL
    • None

    Description

      How to reproduce:

        test("CatalogTable to HiveTable should not change the table's ownership") {
          val catalog = newBasicCatalog()
            val identifier = TableIdentifier("test_table_owner", Some("default"))
            val owner = "Apache Spark"
            val newTable = CatalogTable(
              identifier,
              tableType = CatalogTableType.EXTERNAL,
              storage = CatalogStorageFormat(
                locationUri = None,
                inputFormat = None,
                outputFormat = None,
                serde = None,
                compressed = false,
                properties = Map.empty),
              owner = owner,
              schema = new StructType().add("i", "int"),
              provider = Some("hive"))
      
          catalog.createTable(newTable, false)
          assert(catalog.getTable("default", "test_table_owner").owner === owner)
        }
      
      [info] - CatalogTable to HiveTable should not change the table's ownership *** FAILED *** (267 milliseconds)
      [info]   "[yumwang]" did not equal "[Apache Spark]" (HiveExternalCatalogSuite.scala:136)
      

      Attachments

        Issue Links

          Activity

            People

              yumwang Yuming Wang
              Qin Yao Kent Yao 2
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: