Skip to content

[SPARK-38786][SQL][TEST] Bug in StatisticsSuite 'change stats after add/drop partition command'#36075

Closed
kazuyukitanimura wants to merge 1 commit into
apache:masterfrom
kazuyukitanimura:SPARK-38786
Closed

[SPARK-38786][SQL][TEST] Bug in StatisticsSuite 'change stats after add/drop partition command'#36075
kazuyukitanimura wants to merge 1 commit into
apache:masterfrom
kazuyukitanimura:SPARK-38786

Conversation

@kazuyukitanimura

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

|PARTITION (ds='2008-04-09', hr='12') LOCATION '${partDir1.toURI.toString}'

It should be partDir2 instead of partDir1. Looks like it is a copy paste bug.

Why are the changes needed?

Due to this test bug, the drop command was dropping a wrong (partDir1) underlying file in the test.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added extra underlying file location check.

@github-actions github-actions Bot added the SQL label Apr 5, 2022
@kazuyukitanimura

Copy link
Copy Markdown
Contributor Author

cc @MaxGekk @HyukjinKwon @sunchao

@sunchao sunchao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks @kazuyukitanimura !

@sunchao sunchao closed this in a6b04f0 Apr 6, 2022
@sunchao

sunchao commented Apr 6, 2022

Copy link
Copy Markdown
Member

Committed to master, thanks.

dongjoon-hyun pushed a commit that referenced this pull request May 9, 2022
…dd/drop partition command'

### What changes were proposed in this pull request?
https://github.com/apache/spark/blob/cbffc12f90e45d33e651e38cf886d7ab4bcf96da/sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala#L979
It should be `partDir2` instead of `partDir1`. Looks like it is a copy paste bug.

### Why are the changes needed?
Due to this test bug, the drop command was dropping a wrong (`partDir1`) underlying file in the test.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Added extra underlying file location check.

Closes #36075 from kazuyukitanimura/SPARK-38786.

Authored-by: Kazuyuki Tanimura <ktanimura@apple.com>
Signed-off-by: Chao Sun <sunchao@apple.com>
(cherry picked from commit a6b04f0)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun

dongjoon-hyun commented May 9, 2022

Copy link
Copy Markdown
Member

Thank you, @kazuyukitanimura , @sunchao , @huaxingao . Since the original bug was introduced at SPARK-33770 and was backported to old branches, I'll test and backport this to branch-3.3/3.2/3.1 too.

@dongjoon-hyun

Copy link
Copy Markdown
Member

cc @MaxGekk

dongjoon-hyun pushed a commit that referenced this pull request May 9, 2022
…dd/drop partition command'

### What changes were proposed in this pull request?
https://github.com/apache/spark/blob/cbffc12f90e45d33e651e38cf886d7ab4bcf96da/sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala#L979
It should be `partDir2` instead of `partDir1`. Looks like it is a copy paste bug.

### Why are the changes needed?
Due to this test bug, the drop command was dropping a wrong (`partDir1`) underlying file in the test.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Added extra underlying file location check.

Closes #36075 from kazuyukitanimura/SPARK-38786.

Authored-by: Kazuyuki Tanimura <ktanimura@apple.com>
Signed-off-by: Chao Sun <sunchao@apple.com>
(cherry picked from commit a6b04f0)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit a52a245)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>

@HyukjinKwon HyukjinKwon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM2

dongjoon-hyun pushed a commit that referenced this pull request May 9, 2022
…dd/drop partition command'

### What changes were proposed in this pull request?
https://github.com/apache/spark/blob/cbffc12f90e45d33e651e38cf886d7ab4bcf96da/sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala#L979
It should be `partDir2` instead of `partDir1`. Looks like it is a copy paste bug.

### Why are the changes needed?
Due to this test bug, the drop command was dropping a wrong (`partDir1`) underlying file in the test.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Added extra underlying file location check.

Closes #36075 from kazuyukitanimura/SPARK-38786.

Authored-by: Kazuyuki Tanimura <ktanimura@apple.com>
Signed-off-by: Chao Sun <sunchao@apple.com>
(cherry picked from commit a6b04f0)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit a52a245)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 04161ac)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
kazuyukitanimura added a commit to kazuyukitanimura/spark that referenced this pull request Aug 10, 2022
…dd/drop partition command' (apache#1385)

### What changes were proposed in this pull request?
https://github.com/apache/spark/blob/cbffc12f90e45d33e651e38cf886d7ab4bcf96da/sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala#L979
It should be `partDir2` instead of `partDir1`. Looks like it is a copy paste bug.

### Why are the changes needed?
Due to this test bug, the drop command was dropping a wrong (`partDir1`) underlying file in the test.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Added extra underlying file location check.

Closes apache#36075 from kazuyukitanimura/SPARK-38786.

Authored-by: Kazuyuki Tanimura <ktanimura@apple.com>
Signed-off-by: Chao Sun <sunchao@apple.com>
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.

5 participants