Skip to content

Commit

Permalink
Fix tests round 3 (small round)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Or committed Mar 18, 2016
1 parent 193d93c commit f089e2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ abstract class CatalogTestCases extends SparkFunSuite with BeforeAndAfterEach {

test("list tables with pattern") {
val catalog = newBasicCatalog()
intercept[AnalysisException] { catalog.listTables("unknown_db") }
assert(catalog.listTables("unknown_db").isEmpty)
assert(catalog.listTables("db1", "*").toSet == Set.empty)
assert(catalog.listTables("db2", "*").toSet == Set("tbl1", "tbl2"))
assert(catalog.listTables("db2", "tbl*").toSet == Set("tbl1", "tbl2"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ class MetastoreDataSourcesSuite extends QueryTest with SQLTestUtils with TestHiv
// Drop table will also delete the data.
sql("DROP TABLE savedJsonTable")
intercept[AnalysisException] {
read.json(sessionState.catalog.hiveDefaultTableFilePath(
TableIdentifier("savedJsonTable")))
read.json(
sessionState.catalog.hiveDefaultTableFilePath(TableIdentifier("savedJsonTable")))
}
}

Expand Down Expand Up @@ -728,8 +728,7 @@ class MetastoreDataSourcesSuite extends QueryTest with SQLTestUtils with TestHiv
outputFormat = None,
serde = None,
serdeProperties = Map(
"path" ->
sessionState.catalog.hiveDefaultTableFilePath(TableIdentifier(tableName)))
"path" -> sessionState.catalog.hiveDefaultTableFilePath(TableIdentifier(tableName)))
),
properties = Map(
"spark.sql.sources.provider" -> "json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ class BucketedWriteSuite extends QueryTest with SQLTestUtils with TestHiveSingle

def tableDir: File = {
val identifier = hiveContext.sessionState.sqlParser.parseTableIdentifier("bucketed_table")
new File(URI.create(
hiveContext.sessionState.catalog.hiveDefaultTableFilePath(identifier)))
new File(URI.create(hiveContext.sessionState.catalog.hiveDefaultTableFilePath(identifier)))
}

/**
Expand Down

0 comments on commit f089e2b

Please sign in to comment.