MaxGekk opened a new pull request #31405: URL: https://github.com/apache/spark/pull/31405
### What changes were proposed in this pull request? Remove the check `verifyAlterTableType()` from the following v1 commands: - AlterTableAddPartitionCommand - AlterTableDropPartitionCommand - AlterTableRenamePartitionCommand - AlterTableRecoverPartitionsCommand - AlterTableSerDePropertiesCommand The check is not needed any more after migration on new resolution framework, see SPARK-29900. Also new tests were added to: - AlterTableAddPartitionSuiteBase - AlterTableDropPartitionSuiteBase - AlterTableRenamePartitionSuiteBase - v1/AlterTableRecoverPartitionsSuite and removed duplicate tests from `SQLViewSuite` and `HiveDDLSuite`. The tests for `AlterTableSerDePropertiesCommand` exist in SQLViewSuite` and `HiveDDLSuite`, and they can be ported to unified tests after SPARK-34305. The following commands accept only tables too, so, the check can be removed after migration on new resolution framework: 1. SPARK-34302: `ALTER TABLE .. CHANGE COLUMN` 2. SPARK-34303: `ALTER TABLE ... SET LOCATION` ### Why are the changes needed? To improve code maintenance by removing dead code. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? 1. Added new tests to unified test suites: ``` $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *AlterTableAddPartitionSuite" $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *AlterTableDropPartitionSuite" $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *AlterTableRenamePartitionSuite" $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *AlterTableRecoverPartitionsSuite" ``` 2. Run the modified test suites: ``` $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *SQLViewSuite" $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *HiveDDLSuite" ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
