DTStack / DTStack/chunjun

[Bug] [connector jdbc] jdbc data is consumed during dimensional table join, resulting in location dislocation

Open
#1,864 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
4.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/DTStack/chunjun/issues) and found no similar issues.

### What happened

jdbc data is consumed during dimensional table join, resulting in location dislocation

### What you expected to happen

The jdbc data is consumed correctly when the dimensional table is joined

### How to reproduce

CREATE TABLE tjy_test1_ss
(
`id` int,
`name` string,
age string,
`proc_time` AS `proctime`()
) WITH (
'password' = '11111111',
'timestamp-format.standard' = 'SQL',
'connector' = 'binlog-x',
'port' = '3306',
'cat' = 'insert',
'host' = 'localhost',
-- 'connection-charset' = 'utf-8',
'url' = 'jdbc:mysql://localhost:3306/360test',
'table' = 'test003',
'username' = 'root',
'timestamp'='1702881040000'
);
CREATE TABLE tjy_fortest1
(
`id` int,
`name` string,
`face` string,
PRIMARY KEY (id) NOT ENFORCED
) WITH (
'password' = '123456',
'connector' = 'mysql-x',
'sink.buffer-flush.interval' = '10000',
'sink.buffer-flush.max-rows' = '1024',
'sink.all-replace' = 'true',
'table-name' = 'tjy_fortest1',
'sink.parallelism' = '1',
'url' = 'jdbc:mysql://xxx:3306/middle_test?useunicode=true&characterEncoding=utf8&useSSL=false&useCursorFetch=true',
'username' = 'middle_test'
);
CREATE TABLE zzzzz_star01
(
`qq` int,
`ww` string
) WITH (
'connector' = 'print'
);

insert into zzzzz_star01 select t1.`id` as `qq` ,t2.`name` as `ww` from tjy_test1_ss t1 left join tjy_fortest1 FOR SYSTEM_TIME AS OF `t1`.`proc_time` t2 on t1.name=t2.name;

### Anything else

_No response_

### Version

master

### Are you willing to submit PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.