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
[CARBONDATA-3575] Remove redundant exception throws #3597
Conversation
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1799/ |
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1800/ |
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1801/ |
@jackylk : how to make sure this PR has removed all the redundant exception throwing ? |
I checked it using IntelliJ's Analyzer |
@ajantha-bhat I do not think checkstyle can check this, since it is needs to understand the API semantic |
@jackylk Please describe the PR in details. |
*/ | ||
byte[][] generateAndSplitKey(long[] keys) throws KeyGenException; | ||
byte[][] generateAndSplitKey(long[] keys); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the caller also should handle the throws exception, like: org.apache.carbondata.core.keygenerator.columnar.impl.MultiDimKeyVarLengthVariableSplitGeneratorUnitTest#testGenerateAndSplitKeyAndGetKeyArrayWithActualLogicWithInt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
*/ | ||
public static byte[] getMaxKeyBasedOnOrinal(List<Integer> keyOrdinalList, KeyGenerator generator) | ||
throws KeyGenException { | ||
public static byte[] getMaxKeyBasedOnOrinal( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please optimize it to getMaxKeyBasedOnOrdinal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check Orinal in the whole project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
*/ | ||
byte[] generateKey(long[] keys) throws KeyGenException; | ||
byte[] generateKey(long[] keys); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check all caller, like: org.apache.carbondata.core.scan.result.iterator.RawResultIterator#convertRow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -77,7 +73,7 @@ public BitSet isScanRequired(byte[][] blockMaxValue, byte[][] blockMinValue, | |||
} | |||
|
|||
@Override | |||
public void readColumnChunks(RawBlockletColumnChunks rawBlockletColumnChunks) throws IOException { | |||
public void readColumnChunks(RawBlockletColumnChunks rawBlockletColumnChunks) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why didn't remove the exception? like: org.apache.carbondata.core.scan.filter.executer.FilterExecuter#readColumnChunks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because some subclass need to throw IOException, so it can't be removed
How to handle other redundant exceptions? @jackylk |
@xubo245 all redundant throws are removed |
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1820/ |
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1822/ |
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1823/ |
LGTM |
Why is this PR needed?
After
What changes were proposed in this PR?
Does this PR introduce any user interface change?
Is any new testcase added?