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

CatalogTable to HiveTable should not change the table's ownership

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4, 2.4.4
    • Fix Version/s: 2.4.5, 3.0.0
    • Component/s: SQL
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: