Armelabdelkbir commented on issue #11803:
URL: https://github.com/apache/hudi/issues/11803#issuecomment-2304604767

   @ad1happy2go 
   Thanks i understand for RENAME, what about DROP table, i tried to drop 
column in table, but meta-sync doesn't sync the new schema, when i insert some 
values i see the old column with NULL values
   in PG: 
   ```
   cdc_hudi=> alter table schema_test DROP team ;
   ALTER TABLE
   cdc_hudi=> select * from schema_test ;
    id |   role    |  salary  
   ----+-----------+----------
     2 | Manager   | 90000
     3 | Analyst   | 65000.25
     4 | Engineer  | 75000.5
     5 | Developer | 85000
     6 | DataOps   | 85000
    
   cdc_hudi=> INSERT INTO schema_test (role, salary) VALUES
       ('Tea Engineer','200M')
   
   ```
   2. debezium ok 
   3. i restart my streaming job to take latest version
   4. in hms tables i see always the old column with null values in both _RO 
and _RT tables 
   ```
   |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` STRING,
     `team` STRING)
   USING hudi
   OPTIONS (
     `hoodie.query.as.ro.table` 'true')
   
   spark.sql(s"select id, role, salary, team from 
cdc_hudi.schema_test_ro").show(20)
   
   +---+-----------------+----------+-----------+
   | id|             role|    salary|       team|
   +---+-----------------+----------+-----------+
   |  2|          Manager|   90000.0|       Engineering|
   |  3|          Analyst|  65000.25|       Engineering|
   |  4|         Engineer|   75000.5|       Engineering|
   |  5|        Developer|   85000.0|       Engineering|
   |  6|          DataOps|   85000.0|Engineering|
   | 7|     Tea Engineer|      200M|       null|
   +---+-----------------+----------+-----------+
   ```
    is this behavior expected  ? or i miss something 
   


-- 
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]

Reply via email to