Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Dec 14, 2020

What changes were proposed in this pull request?

List partitions returned by the V2 SHOW PARTITIONS command in alphabetical order.

Why are the changes needed?

To have the same behavior as:

  1. V1 in-memory catalog, see
  2. V1 Hive catalogs, see

Does this PR introduce any user-facing change?

Yes, after the changes, V2 SHOW PARTITIONS sorts its output.

How was this patch tested?

Added new UT to the base trait ShowPartitionsSuiteBase which contains tests for V1 and V2.

@github-actions github-actions bot added the SQL label Dec 14, 2020
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

Thank you, @MaxGekk . I agree with you.
+1, LGTM for Apache Spark 3.2/3.1. (Pending CIs)

@SparkQA
Copy link

SparkQA commented Dec 14, 2020

Test build #132776 has finished for PR 30764 at commit 4bc2259.

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

dongjoon-hyun pushed a commit that referenced this pull request Dec 14, 2020
### What changes were proposed in this pull request?
List partitions returned by the V2 `SHOW PARTITIONS` command in alphabetical order.

### Why are the changes needed?
To have the same behavior as:
1. V1 in-memory catalog, see https://github.com/apache/spark/blob/a28ed86a387b286745b30cd4d90b3d558205a5a7/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala#L546
2. V1 Hive catalogs, see https://github.com/apache/spark/blob/fab2995972761503563fa2aa547c67047c51bd33/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala#L715

### Does this PR introduce _any_ user-facing change?
Yes, after the changes, V2 SHOW PARTITIONS sorts its output.

### How was this patch tested?
Added new UT to the base trait `ShowPartitionsSuiteBase` which contains tests for V1 and V2.

Closes #30764 from MaxGekk/sort-show-partitions.

Authored-by: Max Gekk <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit f156718)
Signed-off-by: Dongjoon Hyun <[email protected]>
@MaxGekk MaxGekk deleted the sort-show-partitions 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.

4 participants