Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21585#discussion_r196507229
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala ---
    @@ -520,4 +544,29 @@ class InsertSuite extends DataSourceTest with 
SharedSQLContext {
           }
         }
       }
    +
    +  test("SPARK-24583 Wrong schema type in InsertIntoDataSourceCommand") {
    +    withTable("test_table") {
    +      val schema = new StructType()
    +        .add("i", LongType, false)
    +        .add("s", StringType, false)
    +      val newTable = CatalogTable(
    +        identifier = TableIdentifier("test_table", None),
    +        tableType = CatalogTableType.EXTERNAL,
    +        storage = CatalogStorageFormat(
    +          locationUri = None,
    +          inputFormat = None,
    +          outputFormat = None,
    +          serde = None,
    +          compressed = false,
    +          properties = Map.empty),
    +        schema = schema,
    +        provider = Some("org.apache.spark.sql.sources.SimpleInsertSource"))
    --- End diff --
    
    use `classOf[SimpleInsertSource].getName` instead of hardcoding


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to