kylin icon indicating copy to clipboard operation
kylin copied to clipboard

KYLIN-4860 Fix union all error

Open zhangayqian opened this issue 3 years ago • 3 comments

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to Kylin? Put an x in the boxes that apply

  • [x] Bugfix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [ ] I have create an issue on Kylin's jira, and have described the bug/feature there in detail
  • [ ] Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
  • [ ] Compiling and unit tests pass locally with my changes
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] If this change need a document change, I will prepare another pr against the document branch
  • [ ] Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at user@kylin or dev@kylin by explaining why you chose the solution you did and what alternatives you considered, etc...

zhangayqian avatar Mar 04 '21 11:03 zhangayqian

Codecov Report

Merging #1599 (0309451) into master (0250081) will decrease coverage by 0.00%. The diff coverage is 40.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1599      +/-   ##
============================================
- Coverage     25.42%   25.41%   -0.01%     
+ Complexity     6765     6763       -2     
============================================
  Files          1508     1508              
  Lines         93918    93912       -6     
  Branches      13158    13158              
============================================
- Hits          23877    23868       -9     
+ Misses        67662    67661       -1     
- Partials       2379     2383       +4     
Impacted Files Coverage Δ Complexity Δ
.../java/org/apache/kylin/common/KylinConfigBase.java 12.46% <0.00%> (ø) 51.00 <0.00> (ø)
...a/org/apache/kylin/query/relnode/OLAPUnionRel.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...stream/core/query/MultiThreadsResultCollector.java 63.91% <66.66%> (+0.37%) 4.00 <0.00> (ø)
...he/kylin/dict/lookup/cache/RocksDBLookupTable.java 72.97% <0.00%> (-5.41%) 6.00% <0.00%> (-1.00%)
.../apache/kylin/tool/query/ProbabilityGenerator.java 71.05% <0.00%> (-5.27%) 11.00% <0.00%> (ø%)
...he/kylin/job/impl/threadpool/DefaultScheduler.java 73.25% <0.00%> (-2.33%) 12.00% <0.00%> (ø%)
...va/org/apache/kylin/tool/query/QueryGenerator.java 80.00% <0.00%> (-1.12%) 23.00% <0.00%> (-1.00%)
...rg/apache/kylin/cube/inmemcubing/MemDiskStore.java 69.30% <0.00%> (-0.92%) 7.00% <0.00%> (ø%)
...apache/kylin/storage/hbase/HBaseResourceStore.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...che/kylin/storage/gtrecord/CubeTupleConverter.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8a79bce...0309451. Read the comment docs.

codecov-io avatar Mar 04 '21 13:03 codecov-io

Pull Request Test Coverage Report for Build 6946

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.004%) to 27.957%

Changes Missing Coverage Covered Lines Changed/Added Lines %
query/src/main/java/org/apache/kylin/query/relnode/OLAPUnionRel.java 0 1 0.0%
<!-- Total: 0 1
Files with Coverage Reduction New Missed Lines %
query/src/main/java/org/apache/kylin/query/relnode/OLAPUnionRel.java 1 0%
core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java 2 68.46%
<!-- Total: 3
Totals Coverage Status
Change from base Build 6943: 0.004%
Covered Lines: 26255
Relevant Lines: 93912

💛 - Coveralls

coveralls avatar Mar 04 '21 13:03 coveralls

There is a problem when unionRel calculates the columnRowType. The current algorithm directly combines the left and right sourceCols into an array with the length of 2 as the sourceCols of unionRel. However, according to the design, it should be equal to the left or right sourceCols.

zhangayqian avatar Mar 05 '21 07:03 zhangayqian