Skip to content

[Bug] During the snapshot phase, projection is not being performed according to the user defined schema. #2470

@hzjhjjyy

Description

@hzjhjjyy

Search before asking

  • I searched in the issues and found nothing similar.

Flink version

1.17.0

Flink CDC version

<=master

Database and its version

such as mysql,oracle,pg,sqlserver,take oracle 11g as an example.

Minimal reproduce step

Assuming the ABC table contains three fields, A, B, and C.

ddl:
CREATE TABLE ABC (
 A BIGINT NOT NULL,
 B STRING,
 PRIMARY KEY(A) NOT ENFORCED
) WITH (
 'connector' = 'oracle-cdc',
 'hostname' = '192.168.xxx.xxx',
 'port' = '1521',
 'username' = 'xxx',
 'password' = 'xxx',
 'database-name' = 'xxx',
 'schema-name' = 'xxx',
 'table-name' = 'ABC',
 'debezium.log.mining.strategy' = 'online_catalog',
 'debezium.log.mining.continuous.mine' = 'true',
 'debezium.database.tablename.case.insensitive' = 'false');

dml:
select * from ABC;

What did you expect to see?

should be:
查部分
Projection is performed according to the schema definition, and it takes 2.534 seconds.

What did you see instead?

snapshot phase:
查全部
The screenshot indicates that an * was used as the query condition, and projection was not performed as defined by the schema. And it took 3.532 seconds to execute this query.

Anything else?

When dealing with a large amount of data and numerous partitions, this time can become quite significant.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions