Skip to content

[SPARK-5195][sql]Update HiveMetastoreCatalog.scala(override the MetastoreRelation's sameresult method only compare databasename and table name) #3898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,13 @@ private[hive] case class MetastoreRelation
.getOrElse(sqlContext.defaultSizeInBytes))
}
)
override def sameResult(plan: LogicalPlan): Boolean = {
plan match {
case mr: MetastoreRelation =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 2 spaces for intents.

I'll fix while merging.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, marmbrus but i don't know how to make PRs against master,can you tell me? thanks again for your attension

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you open the PR make sure the base branch says master not branch-1.X. https://help.github.com/articles/comparing-commits-across-time/#comparing-branches

mr.databaseName == databaseName && mr.tableName == tableName
case _ => false
}
}

val tableDesc = HiveShim.getTableDesc(
Class.forName(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ class CachedTableSuite extends QueryTest {
sql("SELECT * FROM src"),
preCacheResults)

assertCached(sql("SELECT * FROM src s"))

checkAnswer(
sql("SELECT * FROM src s"),
preCacheResults)

uncacheTable("src")
assertCached(sql("SELECT * FROM src"), 0)
}
Expand Down