JoshuaZhuCN opened a new issue, #6001:
URL: https://github.com/apache/hudi/issues/6001
Cannot create again after deleting the Hudi external table using Spark SQL
**To Reproduce**
Steps to reproduce the behavior:
1.
```
CREATE TABLE IF NOT EXISTS `default`.`spark_hudi_test_ddl` (
`id` int, `vname` string, `price` decimal(14, 2), `sync_time` timestamp
) USING HUDI
OPTIONS(`hoodie.query.as.ro.table` = 'false')
TBLPROPERTIES (
type='mor',
primaryKey='id',
preCombineField='sync_time'
)
LOCATION 'hdfs://localhost:9000/hudi/test/spark_hudi_test_ddl';
```
2.
```
DROP TABLE IF EXISTS `default`.`spark_hudi_test_ddl`;
```
3.
repeat step 1
4.
it will get an error message like
```
Specified schema in create table statement is not equal to the table
schema.You should not specify the schema for an exist table:
`default`.`spark_hudi_test_ddl`
```
5、If we delete the .hoodie directory, and repeat step 1, then it works
**Environment Description**
* Hudi version : 0.10.1
* Spark version : 3.1.3
* Hive version : 3.1.0
* Hadoop version : 3.1.1
* Storage (HDFS/S3/GCS..) : hdfs
* Running on Docker? (yes/no) : not
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]