trushev commented on PR #5830:
URL: https://github.com/apache/hudi/pull/5830#issuecomment-1354714159
@voonhous
As I understand you are talking about this case
```sql
Flink SQL>
-- write with schema1
create table tbl(`id` int primary key, `value` int)
partitioned by (`id`)
with ('connector'='hudi', 'path'='/tmp/tbl');
insert into tbl values (1, 10);
drop table tbl;
-- write with schema2 int => double
create table tbl(`id` int primary key, `value` double)
partitioned by (`id`)
with ('connector'='hudi', 'path'='/tmp/tbl');
insert into tbl values (2, 20.0);
-- read all data
select * from tbl; -- throws exception due to tbl consists of two
partitioned files (1, 10) and (2, 20.0)
```
```java
Caused by: java.lang.IllegalArgumentException: Unexpected type: INT32
```
While if we delete `partitioned by ('id')` in sql above, tbl will consist of
two unpartitioned files (1, 10.0), (2, 20.0) and read query will work fine
```sql
select * from tbl;
```
```
+----+-------------+--------------------------------+
| op | id | value |
+----+-------------+--------------------------------+
| +I | 1 | 10.0 |
| +I | 2 | 20.0 |
+----+-------------+--------------------------------+
```
In my opinion it's a good idea to support such scenario you described for
spark https://github.com/apache/hudi/pull/7480
Currently, I have no plans to implement it so you can do it if you wish
--
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]