starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

[BugFix] generate statistics for empty iceberg table

Open hongli-my opened this issue 2 years ago • 10 comments

What type of PR is this:

  • [x] bug
  • [ ] feature
  • [ ] enhancement
  • [ ] refactor
  • [ ] others

Which issues of this PR fixes :

Fixes #6840

Problem Summary(Required) :

return statistics for empty iceberg table, and record is zero.

hongli-my avatar Jun 02 '22 06:06 hongli-my

@DorianZheng , plz review it.

I want to add ut, maybe add in generate optimizedPlan, but how to contruct iceberg table.

hongli-my avatar Jun 02 '22 06:06 hongli-my

@hongli-my you can rerun the job just left a message like "run starrocks_fe_unittest", then the job will run atomaticly

imay avatar Jun 02 '22 14:06 imay

[FE PR Coverage check]

:disappointed: fail : 0 / 17 (00.00%)

file detail

path covered line new line coverage
:large_blue_circle: com/starrocks/external/iceberg/cost/IcebergTableStatisticCalculator.java 0 17 00.00%

wanpengfei-git avatar Jun 02 '22 14:06 wanpengfei-git

run starrocks_fe_unittest

hongli-my avatar Jun 06 '22 01:06 hongli-my

run starrocks_fe_unittest

DorianZheng avatar Jun 06 '22 07:06 DorianZheng

plz add ut

done, I mock currentSnapshot function to return null to generate IcebergFileStats

hongli-my avatar Jul 15 '22 10:07 hongli-my

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

sonarcloud[bot] avatar Jul 15 '22 10:07 sonarcloud[bot]

[FE PR Coverage Check]

:disappointed: fail : 1 / 17 (05.88%)

file detail

path covered_line new_line coverage not_covered_line_detail
:large_blue_circle: com/starrocks/external/iceberg/cost/IcebergTableStatisticCalculator.java 1 17 05.88% [70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 84, 85, 86, 225, 226]

wanpengfei-git avatar Jul 15 '22 10:07 wanpengfei-git

run starrocks_admit_test

wangruin avatar Aug 08 '22 11:08 wangruin

run starrocks_admit_test

wanpengfei-git avatar Aug 08 '22 13:08 wanpengfei-git

@Mergifyio backport branch-2.4

Youngwb avatar Sep 19 '22 01:09 Youngwb

backport branch-2.4

✅ Backports have been created

mergify[bot] avatar Sep 19 '22 02:09 mergify[bot]