Skip to content

Conversation

@wzhfy
Copy link
Contributor

@wzhfy wzhfy commented Jun 28, 2017

What changes were proposed in this pull request?

Invalidate spark's stats after data changing commands:

  • InsertIntoHadoopFsRelationCommand
  • InsertIntoHiveTable
  • LoadDataCommand
  • TruncateTableCommand
  • AlterTableSetLocationCommand
  • AlterTableDropPartitionCommand

How was this patch tested?

Added test cases.

}
}

test("change stats after truncate command") {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I use "change" instead of "invalidate" in the test name, because in the near future when we support auto update, we can add check logic in the same test cases.

@wzhfy
Copy link
Contributor Author

wzhfy commented Jun 28, 2017

cc @cloud-fan

@SparkQA
Copy link

SparkQA commented Jun 28, 2017

Test build #78782 has finished for PR 18449 at commit 6659b7c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.


val stats2 = checkTableStats(
managedTable, hasSizeInBytes = true, expectedRowCounts = Some(4))
assert(stats1 == stats2)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This check is no longer valid since stats is now removed after drop partition command.

@cloud-fan
Copy link
Contributor

LGTM, merging to master!

@asfgit asfgit closed this in 82e2491 Jun 29, 2017
robert3005 pushed a commit to palantir/spark that referenced this pull request Jun 29, 2017
## What changes were proposed in this pull request?

Invalidate spark's stats after data changing commands:

- InsertIntoHadoopFsRelationCommand
- InsertIntoHiveTable
- LoadDataCommand
- TruncateTableCommand
- AlterTableSetLocationCommand
- AlterTableDropPartitionCommand

## How was this patch tested?

Added test cases.

Author: wangzhenhua <wangzhenhua@huawei.com>

Closes apache#18449 from wzhfy/removeStats.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants