oraclereader when use splitPk which is not unique got duplicate split query sql
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 5.7k
- PR merge metrics
- No merged PRs in 30d
Description
when split key column is not unique will got duplicate split query sql
```
[job-0] INFO SingleTableSplitUtil - After split(), allQuerySql=[
...
select DAY,PCODE,DOGNUM,GID,FNCODE,VER,PROJECT_ID,DURATION,TRIGERTIME,RECEIVETIME,ETLTIME,ASSET_ID,PROVINCE,CITY,ASSET_ID_HB from PRO_ODS.IO_DURATIONINFO where (20210426 <= DAY
AND DAY < 20210426)
select DAY,PCODE,DOGNUM,GID,FNCODE,VER,PROJECT_ID,DURATION,TRIGERTIME,RECEIVETIME,ETLTIME,ASSET_ID,PROVINCE,CITY,ASSET_ID_HB from PRO_ODS.IO_DURATIONINFO where (20210426 <= DAY
AND DAY < 20210426)
select DAY,PCODE,DOGNUM,GID,FNCODE,VER,PROJECT_ID,DURATION,TRIGERTIME,RECEIVETIME,ETLTIME,ASSET_ID,PROVINCE,CITY,ASSET_ID_HB from PRO_ODS.IO_DURATIONINFO where (20210426 <= DAY
AND DAY < 20210428)
...
]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the OracleReader splitPk path and the SingleTableSplitUtil split() output shown in the report; reproduce the case with a non-unique split key and inspect the generated allQuerySql list. Done means the split produces no duplicate SQL statements while retaining the correct query ranges.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100