You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2021/05/05 00:11:35 UTC

[GitHub] [orc] autumnust opened a new pull request #694: ORC-793: Fix the typo in setInt method within OrcConf

autumnust opened a new pull request #694:
URL: https://github.com/apache/orc/pull/694


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. File a JIRA issue first and use it as a prefix of your PR title, e.g., `ORC-001: Fix ABC`.
     2. Use your PR title to summarize what this PR proposes instead of describing the problem.
     3. Make PR title and description complete because these will be the permanent commit log.
     4. If possible, provide a concise and reproducible example to reproduce the issue for a faster review.
     5. If the PR is unfinished, use GitHub PR Draft feature.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If there is a discussion in the mailing list, please add the link.
   -->
   There was two duplicated `getInt` method existed in `OrcConf` but no `setInt`. From the existing implementation it is obvious that the method `getInt` is a typo and it should `setInt` instead.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   This patch is rather straightforward, running through existing unit tests. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [orc] dongjoon-hyun commented on a change in pull request #694: ORC-793: Fix the typo in setInt method within OrcConf

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #694:
URL: https://github.com/apache/orc/pull/694#discussion_r626188520



##########
File path: java/core/src/java/org/apache/orc/OrcConf.java
##########
@@ -244,7 +244,7 @@ public int getInt(Configuration conf) {
     return getInt(null, conf);
   }
 
-  public void getInt(Configuration conf, int value) {
+  public void setInt(Configuration conf, int value) {

Review comment:
       Wow. Nice catching.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [orc] dongjoon-hyun commented on pull request #694: ORC-793: Deprecate the incorrect getInt method and add a new setInt within OrcConf

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #694:
URL: https://github.com/apache/orc/pull/694#issuecomment-832884791


   Also, thank you, @pgaref !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [orc] autumnust edited a comment on pull request #694: ORC-793: Fix the typo in setInt method within OrcConf

Posted by GitBox <gi...@apache.org>.
autumnust edited a comment on pull request #694:
URL: https://github.com/apache/orc/pull/694#issuecomment-832345861


   > Thank you so much, @autumnust .
   > 
   > Although this is a correct fix and `void getInt` doesn't make senses, Apache ORC follows [semantic versioning](https://semver.org) rule. We cannot remove a public method like this at Apache ORC 1.7.x.
   > 
   > Instead, could you add a new function `public void setInt(Configuration conf, int value)` and add a deprecated annotation and description to the wrong old function, `public void getInt()`, please? And, the PR title and description should be revised accordingly.
   > 
   > cc @omalley , @pgaref , @wgtmac , @williamhyun
   
   thanks for suggestions. @dongjoon-hyun  Do you think it is necessary to make the original incorrect `getInt` a noop method? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [orc] pgaref commented on a change in pull request #694: ORC-793: Deprecate the incorrect getInt method and add a new setInt within OrcConf

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #694:
URL: https://github.com/apache/orc/pull/694#discussion_r626385923



##########
File path: java/core/src/java/org/apache/orc/OrcConf.java
##########
@@ -244,7 +244,7 @@ public int getInt(Configuration conf) {
     return getInt(null, conf);
   }
 
-  public void getInt(Configuration conf, int value) {
+  public void setInt(Configuration conf, int value) {

Review comment:
       Good catch indeed! 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [orc] autumnust edited a comment on pull request #694: ORC-793: Fix the typo in setInt method within OrcConf

Posted by GitBox <gi...@apache.org>.
autumnust edited a comment on pull request #694:
URL: https://github.com/apache/orc/pull/694#issuecomment-832345861


   > Thank you so much, @autumnust .
   > 
   > Although this is a correct fix and `void getInt` doesn't make senses, Apache ORC follows [semantic versioning](https://semver.org) rule. We cannot remove a public method like this at Apache ORC 1.7.x.
   > 
   > Instead, could you add a new function `public void setInt(Configuration conf, int value)` and add a deprecated annotation and description to the wrong old function, `public void getInt()`, please? And, the PR title and description should be revised accordingly.
   > 
   > cc @omalley , @pgaref , @wgtmac , @williamhyun
   
   thanks for suggestions. @dongjoon-hyun  Do you think it is necessary to make the original incorrect `getInt` a noop method since it could cause unexpected side effect? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [orc] autumnust commented on pull request #694: ORC-793: Fix the typo in setInt method within OrcConf

Posted by GitBox <gi...@apache.org>.
autumnust commented on pull request #694:
URL: https://github.com/apache/orc/pull/694#issuecomment-832345861


   > Thank you so much, @autumnust .
   > 
   > Although this is a correct fix and `void getInt` doesn't make senses, Apache ORC follows [semantic versioning](https://semver.org) rule. We cannot remove a public method like this at Apache ORC 1.7.x.
   > 
   > Instead, could you add a new function `public void setInt(Configuration conf, int value)` and add a deprecated annotation and description to the wrong old function, `public void getInt()`, please? And, the PR title and description should be revised accordingly.
   > 
   > cc @omalley , @pgaref , @wgtmac , @williamhyun
   
   thanks for suggestions. @dongjoon-hyun  Do you think it is necessary to make the original incorrect `getInt` a noop? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [orc] dongjoon-hyun closed pull request #694: ORC-793: Deprecate the incorrect getInt method and add a new setInt within OrcConf

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #694:
URL: https://github.com/apache/orc/pull/694


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org