Skip to content

Conversation

@ulysses-you
Copy link
Contributor

What changes were proposed in this pull request?

Change to plain cast to PartitioningUtils.castPartitionSpec in convertToPartIdent. So the behavior can follow the STORE_ASSIGNMENT_POLICY.

Why are the changes needed?

Make v2 code path ALTER PARTITION follows STORE_ASSIGNMENT_POLICY in ansi mode.

Does this PR introduce any user-facing change?

no

How was this patch tested?

remove the test
SPARK-40798: Alter partition should verify partition value - legacy.

This change has been convered at :
SPARK-40798: Alter partition should verify partition value

@github-actions github-actions bot added the SQL label Oct 31, 2022
@ulysses-you
Copy link
Contributor Author

cc @HyukjinKwon @cloud-fan


withSQLConf(
SQLConf.SKIP_TYPE_VALIDATION_ON_ALTER_PARTITION.key -> "true",
SQLConf.ANSI_ENABLED.key -> "false") {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we maybe keep the test after removing SQLConf.ANSI_ENABLED.key -> "false"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before I thought the storeAssignmentPolicy is enough so this test is corvered by AlterTableAddPartitionSuiteBase. Just change to legacy to restroe previous behavior.

Now I add one more SKIP_TYPE_VALIDATION_ON_ALTER_PARTITION check and keep this test.

@ulysses-you
Copy link
Contributor Author

@HyukjinKwon @cloud-fan hope we can get this in if you find some time, thank you

@HyukjinKwon
Copy link
Member

Merged to master.

@ulysses-you ulysses-you deleted the SPARK-40798-follow branch November 3, 2022 11:02
SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
### What changes were proposed in this pull request?

Change to plain cast to `PartitioningUtils.castPartitionSpec` in convertToPartIdent. So the behavior can follow the `STORE_ASSIGNMENT_POLICY`.

### Why are the changes needed?

Make v2 code path ALTER PARTITION follows `STORE_ASSIGNMENT_POLICY` in ansi mode.

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

no

### How was this patch tested?

remove the test
`SPARK-40798: Alter partition should verify partition value - legacy`.

This change has been convered at :
`SPARK-40798: Alter partition should verify partition value`

Closes apache#38449 from ulysses-you/SPARK-40798-follow.

Authored-by: ulysses-you <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
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