Armelabdelkbir commented on issue #11803:
URL: https://github.com/apache/hudi/issues/11803#issuecomment-2302093419
i tried also to rename column but not working as expected:
Rename column in PG:
```
cdc_hudi=> ALTER TABLE schema_test
RENAME COLUMN department TO team;
ALTER TABLE
cdc_hudi=> INSERT INTO schema_test (role, salary, team)
VALUES ('DataOps', 85000.00, 'Engineering');
```
in hudi tables i see both of columns old one and new one :
```
|CREATE TABLE `cdc_hudi`.`schema_test_ro` (
`_hoodie_commit_time` STRING,
`_hoodie_commit_seqno` STRING,
`_hoodie_record_key` STRING,
`_hoodie_partition_path` STRING,
`_hoodie_file_name` STRING,
`_hoodie_is_deleted` BOOLEAN,
`ts_ms` BIGINT,
`op` STRING,
`id` INT,
`role` STRING,
`salary` DOUBLE,
`department` STRING,
`team` STRING)
USING hudi
OPTIONS (
`hoodie.query.as.ro.table` 'true')
spark.sql(s"select op,id,role,salary,department,team from
cdc_hudi.schema_test_ro").show(100)
+---+---+---------+--------+-----------+-----------+
| op| id| role| salary| department| team|
+---+---+---------+--------+-----------+-----------+
| c| 2| Manager| 90000.0| null| null|
| c| 3| Analyst|65000.25| null| null|
| c| 4| Engineer| 75000.5| null| null|
| c| 5|Developer| 85000.0|Engineering| null|
| c| 6| DataOps| 85000.0| null|Engineering|
+---+---+---------+--------+-----------+-----------+
```
--
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]