vinlee19 opened a new pull request, #308:
URL: https://github.com/apache/doris-flink-connector/pull/308

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   1. The common example is generating a “serial number” for each row. In 
PostgreSQL this is typically done by something like:
   ```sql
   create table if not exists doris_cdc.wkb_test
   (
       id       serial
           primary key,
       location bytea
   );
   ```
   The  default value expression for column `id` is: 
`nextval('doris_cdc.wkb_test_id_seq'::regclass)'`.However,we can't use 
nextval() as a default value for numeric columns in Doris.
   
   2. When we create a table in MySQL as follows and specify current_timestamp 
as the default value:
   ```sql
   create table a_test_11
   (id int primary key ,
   test_dt_0 datetime,
   test_dt_1 datetime(1),
   test_dt_3 datetime(3),
   test_dt_6 datetime(6),
   test_ts_0 timestamp default current_timestamp,
   test_ts_1 timestamp(1) default current_timestamp(1),
   test_ts_3 timestamp(3) default current_timestamp(3),
   test_ts_6 timestamp(6) default current_timestamp(6));
   ```
   The precision of `current_timestamp` will be lost and the result will be 
incorrect, as follows:
   ```sql
   CREATE TABLE IF NOT EXISTS `a_test_11`
   (`id` INT COMMENT '',
    `test_dt_0` DATETIMEV2(0) COMMENT '',
    `test_dt_1` DATETIMEV2(1) COMMENT '',
    `test_dt_3` DATETIMEV2(3) COMMENT '',
    `test_dt_6` DATETIMEV2(6) COMMENT '',
    `test_ts_0` DATETIMEV2(0) DEFAULT CURRENT_TIMESTAMP COMMENT '',
    `test_ts_1` DATETIMEV2(1) DEFAULT 'CURRENT_TIMESTAMP(1) COMMENT' '',
    `test_ts_3` DATETIMEV2(3) DEFAULT 'CURRENT_TIMESTAMP(1) COMMENT' '',
    `test_ts_6` DATETIMEV2(6) DEFAULT 'CURRENT_TIMESTAMP(6) COMMENT' '' ) 
    UNIQUE KEY(`id`) 
    DISTRIBUTED BY HASH(`id`) BUCKETS AUTO  
    PROPERTIES 
    ('replication_num'='1','light_schema_change'='true');
   ```
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   


-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to