Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KYLIN-4682 Fix java.lang.IndexOutOfBoundsException due to not setting havingFilter correctly #1529

Merged
merged 2 commits into from
Jan 4, 2021

Conversation

kyotoYaho
Copy link
Contributor

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

  • 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...

@codecov-io
Copy link

Codecov Report

Merging #1529 (f8d1f1d) into master (47f8e54) will decrease coverage by 0.07%.
The diff coverage is 1.98%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1529      +/-   ##
============================================
- Coverage     25.51%   25.44%   -0.08%     
+ Complexity     6765     6762       -3     
============================================
  Files          1505     1507       +2     
  Lines         93632    93828     +196     
  Branches      13117    13145      +28     
============================================
- Hits          23886    23870      -16     
- Misses        67370    67577     +207     
- Partials       2376     2381       +5     
Impacted Files Coverage Δ Complexity Δ
.../java/org/apache/kylin/job/util/JobRestClient.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...che/kylin/engine/spark/SparkMergingDictionary.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...g/apache/kylin/query/relnode/OLAPAggregateRel.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../org/apache/kylin/query/relnode/OLAPFilterRel.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...a/org/apache/kylin/tool/job/CubeBuildingCLIV2.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...main/java/org/apache/kylin/common/KylinConfig.java 38.46% <42.85%> (-0.11%) 30.00 <1.00> (+1.00) ⬇️
...org/apache/kylin/common/restclient/RestClient.java 17.79% <100.00%> (ø) 8.00 <0.00> (ø)
.../apache/kylin/tool/query/ProbabilityGenerator.java 65.78% <0.00%> (-10.53%) 10.00% <0.00%> (-1.00%)
...he/kylin/dict/lookup/cache/RocksDBLookupTable.java 72.97% <0.00%> (-5.41%) 6.00% <0.00%> (-1.00%)
...org/apache/kylin/rest/util/QueryRequestLimits.java 35.71% <0.00%> (-4.77%) 5.00% <0.00%> (-1.00%)
... and 8 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 0abf206...f8d1f1d. Read the comment docs.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6699

  • 0 of 47 (0.0%) changed or added relevant lines in 2 files are covered.
  • 6 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.01%) to 27.982%

Changes Missing Coverage Covered Lines Changed/Added Lines %
query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java 0 20 0.0%
query/src/main/java/org/apache/kylin/query/relnode/OLAPFilterRel.java 0 27 0.0%
Files with Coverage Reduction New Missed Lines %
core-dictionary/src/main/java/org/apache/kylin/dict/lookup/cache/RocksDBLookupTable.java 1 81.08%
query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java 2 0%
source-jdbc/src/main/java/org/apache/kylin/source/jdbc/JdbcHiveInputBase.java 3 10.19%
Totals Coverage Status
Change from base Build 6698: -0.01%
Covered Lines: 26255
Relevant Lines: 93828

💛 - Coveralls

Copy link
Member

@hit-lacus hit-lacus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@zzcclp
Copy link
Contributor

zzcclp commented Jan 4, 2021

Verified passed. LGTM.

Before this pr:

'OPS_USER_ID' is shard by column.

SELECT SELLER_ID,
    CASE WHEN OPS_USER_ID = 'MODELER' THEN OPS_USER_ID
         ELSE OPS_REGION
    END AS dyna_GROUP,
    SUM(PRICE)
FROM KYLIN_SALES
GROUP BY 1, 2
HAVING SELLER_id is not null and SUM(PRICE)>10

image

select LSTG_FORMAT_NAME, OPS_USER_ID, sum(price) as gmv
from KYLIN_SALES
group by LSTG_FORMAT_NAME, OPS_USER_ID
having OPS_USER_ID = 'MODELER'

image

After this pr:

The sql shown above are executed successfully.

image

image

@kyotoYaho
Copy link
Contributor Author

LGTM

@hit-lacus hit-lacus merged commit 92e8d75 into apache:master Jan 4, 2021
zzcclp pushed a commit to zzcclp/kylin that referenced this pull request Jan 4, 2021
… havingFilter correctly (apache#1529)

* KYLIN-4682 Fix java.lang.IndexOutOfBoundsException due to not setting havingFilter correctly

* KYLIN-4682 Add test cases

(cherry picked from commit 92e8d75)
zzcclp pushed a commit to zzcclp/kylin that referenced this pull request Jan 5, 2021
… havingFilter correctly (apache#1529)

* KYLIN-4682 Fix java.lang.IndexOutOfBoundsException due to not setting havingFilter correctly

* KYLIN-4682 Add test cases

(cherry picked from commit 92e8d75)
zzcclp pushed a commit to zzcclp/kylin that referenced this pull request Jan 5, 2021
… havingFilter correctly (apache#1529)

* KYLIN-4682 Fix java.lang.IndexOutOfBoundsException due to not setting havingFilter correctly

* KYLIN-4682 Add test cases

(cherry picked from commit 92e8d75)
zzcclp pushed a commit to zzcclp/kylin that referenced this pull request Jan 6, 2021
… havingFilter correctly (apache#1529)

* KYLIN-4682 Fix java.lang.IndexOutOfBoundsException due to not setting havingFilter correctly

* KYLIN-4682 Add test cases

(cherry picked from commit 92e8d75)
zzcclp pushed a commit to zzcclp/kylin that referenced this pull request Jan 8, 2021
… havingFilter correctly (apache#1529)

* KYLIN-4682 Fix java.lang.IndexOutOfBoundsException due to not setting havingFilter correctly

* KYLIN-4682 Add test cases

(cherry picked from commit 92e8d75)
zzcclp pushed a commit to zzcclp/kylin that referenced this pull request Jan 8, 2021
… havingFilter correctly (apache#1529)

* KYLIN-4682 Fix java.lang.IndexOutOfBoundsException due to not setting havingFilter correctly

* KYLIN-4682 Add test cases

(cherry picked from commit 92e8d75)
hit-lacus pushed a commit to hit-lacus/kylin that referenced this pull request Apr 19, 2021
… havingFilter correctly (apache#1529)

* KYLIN-4682 Fix java.lang.IndexOutOfBoundsException due to not setting havingFilter correctly

* KYLIN-4682 Add test cases
zhangayqian pushed a commit that referenced this pull request Nov 5, 2021
… havingFilter correctly (#1529)

* KYLIN-4682 Fix java.lang.IndexOutOfBoundsException due to not setting havingFilter correctly

* KYLIN-4682 Add test cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants