Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Dec 5, 2020

What changes were proposed in this pull request?

Invoke the check DDLUtils.verifyPartitionProviderIsHive() from V1 implementation of SHOW TABLE EXTENDED when partition specs are specified.

This PR is some kind of follow up #16373 and #15515.

Why are the changes needed?

To output an user friendly error with recommendation like
"
... partition metadata is not stored in the Hive metastore. To import this information into the metastore, run msck repair table tableName
"

instead of silently output an empty result.

Does this PR introduce any user-facing change?

Yes.

How was this patch tested?

By running the affected test suites, in particular:

$ build/sbt -Phive-2.3 -Phive-thriftserver "hive/test:testOnly *PartitionProviderCompatibilitySuite"

@github-actions github-actions bot added the SQL label Dec 5, 2020
@SparkQA
Copy link

SparkQA commented Dec 5, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36872/

@SparkQA
Copy link

SparkQA commented Dec 5, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36872/

@SparkQA
Copy link

SparkQA commented Dec 5, 2020

Test build #132271 has finished for PR 30618 at commit c82c61a.

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


class ShowTablesSuite extends ShowTablesSuiteBase with SharedSparkSession
class ShowTablesSuite extends ShowTablesSuiteBase with SharedSparkSession {
test("show partitions from a datasource table") {
Copy link
Member

Choose a reason for hiding this comment

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

Shall we add a JIRA prefix, @MaxGekk?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't add because tests from the suite have a prefix already. See the base trait where we override the test() method. Maybe, 2 prefixes are ok.

@SparkQA
Copy link

SparkQA commented Dec 6, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36885/

@SparkQA
Copy link

SparkQA commented Dec 6, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36885/

@SparkQA
Copy link

SparkQA commented Dec 6, 2020

Test build #132284 has finished for PR 30618 at commit 5058fe5.

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

@HyukjinKwon
Copy link
Member

HyukjinKwon commented Dec 7, 2020

Merged to master, branch-3.1.

HyukjinKwon pushed a commit that referenced this pull request Dec 7, 2020
…ABLE EXTENDED

### What changes were proposed in this pull request?
Invoke the check `DDLUtils.verifyPartitionProviderIsHive()` from V1 implementation of `SHOW TABLE EXTENDED` when partition specs are specified.

This PR is some kind of follow up #16373 and #15515.

### Why are the changes needed?
To output an user friendly error with recommendation like
**"
... partition metadata is not stored in the Hive metastore. To import this information into the metastore, run `msck repair table tableName`
"**
instead of silently output an empty result.

### Does this PR introduce _any_ user-facing change?
Yes.

### How was this patch tested?
By running the affected test suites, in particular:
```
$ build/sbt -Phive-2.3 -Phive-thriftserver "hive/test:testOnly *PartitionProviderCompatibilitySuite"
```

Closes #30618 from MaxGekk/show-table-extended-verifyPartitionProviderIsHive.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit 29096a8)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@HyukjinKwon
Copy link
Member

@MaxGekk it has a conflict with branch-3.0 and I didn't bother to port back since it's a error message change only. But feel free to open a PR to backport if you feel it's worth.

MaxGekk added a commit to MaxGekk/spark that referenced this pull request Dec 7, 2020
…ABLE EXTENDED

Invoke the check `DDLUtils.verifyPartitionProviderIsHive()` from V1 implementation of `SHOW TABLE EXTENDED` when partition specs are specified.

This PR is some kind of follow up apache#16373 and apache#15515.

To output an user friendly error with recommendation like
**"
... partition metadata is not stored in the Hive metastore. To import this information into the metastore, run `msck repair table tableName`
"**
instead of silently output an empty result.

Yes.

By running the affected test suites, in particular:
```
$ build/sbt -Phive-2.3 -Phive-thriftserver "hive/test:testOnly *PartitionProviderCompatibilitySuite"
```

Closes apache#30618 from MaxGekk/show-table-extended-verifyPartitionProviderIsHive.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit 29096a8)
Signed-off-by: Max Gekk <max.gekk@gmail.com>
MaxGekk added a commit to MaxGekk/spark that referenced this pull request Dec 7, 2020
…ABLE EXTENDED

Invoke the check `DDLUtils.verifyPartitionProviderIsHive()` from V1 implementation of `SHOW TABLE EXTENDED` when partition specs are specified.

This PR is some kind of follow up apache#16373 and apache#15515.

To output an user friendly error with recommendation like
**"
... partition metadata is not stored in the Hive metastore. To import this information into the metastore, run `msck repair table tableName`
"**
instead of silently output an empty result.

Yes.

By running the affected test suites, in particular:
```
$ build/sbt -Phive-2.3 -Phive-thriftserver "hive/test:testOnly *PartitionProviderCompatibilitySuite"
```

Closes apache#30618 from MaxGekk/show-table-extended-verifyPartitionProviderIsHive.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit 29096a8)
Signed-off-by: Max Gekk <max.gekk@gmail.com>
@MaxGekk
Copy link
Member Author

MaxGekk commented Dec 7, 2020

@MaxGekk MaxGekk deleted the show-table-extended-verifyPartitionProviderIsHive branch February 19, 2021 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants