wuzhenhua created FLINK-35971:
---------------------------------

             Summary: Lose precision in PostgresParallelSource
                 Key: FLINK-35971
                 URL: https://issues.apache.org/jira/browse/FLINK-35971
             Project: Flink
          Issue Type: Bug
          Components: Flink CDC
         Environment: Flink version
1.14.0
 

Flink CDC version
2.4.1
 

Database and its version
PostgreSQL 10.23

            Reporter: wuzhenhua


Reproduce step:

{code:java}
CREATE TABLE IF NOT EXISTS s1.t1
(
    id bigint NOT NULL,
    tm time without time zone,
    CONSTRAINT t1_pkey PRIMARY KEY (id)
)
{code}

{code:java}
INSERT INTO s1.t1 VALUES(1, '10:33:23.660863')
{code}

{code:java}
val prop = new Properties()

val pgSource = PostgresSourceBuilder.PostgresIncrementalSource.builder[String]
    .hostname("localhost")
    .port(5432)
    .database("cdc_test")
    .schemaList("s1")
    .tableList("s1.t1")
    .username("postgres")
    .password("postgres")
    .deserializer(new JsonDebeziumDeserializationSchema)
    .slotName("aaa")
    .decodingPluginName("pgoutput")
    .debeziumProperties(prop)
    .build()

env.enableCheckpointing(3000)
env.fromSource(pgSource, WatermarkStrategy.noWatermarks[String](), 
"PostgresParallelSource").print()
env.execute("Print Postgres Snapshot + WAL")
{code}

expect to see:
{code:java}
"after":{"id":1,"tm":38003660863}
{code}

i see instead:
{code:java}
"after":{"id":1,"tm":38003660000}
{code}

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to