Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16636#discussion_r98315149
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala 
---
    @@ -1527,6 +1527,21 @@ class DDLSuite extends QueryTest with 
SharedSQLContext with BeforeAndAfterEach {
         }
       }
     
    +  test("create a data source table without schema") {
    +    import testImplicits._
    +    withTempPath { tempDir =>
    +      withTable("tab1", "tab2") {
    +        (("a", "b") :: Nil).toDF().write.json(tempDir.getCanonicalPath)
    +
    +        val e = intercept[AnalysisException] { sql("CREATE TABLE tab1 
USING json") }.getMessage
    --- End diff --
    
    This error message is not from the code added by this PR. It is from [the 
original 
logics](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala#L343-L345).
 The error message is right if our file-based data sources are unable to infer 
the schema.
    
    Sure, I will add a test case for `LibSVM `


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to