You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/12/26 17:18:20 UTC

[GitHub] [incubator-hudi] lamber-ken opened a new pull request #1143: [MINOR] Fix out of limits for results

lamber-ken opened a new pull request #1143: [MINOR] Fix out of limits for results
URL: https://github.com/apache/incubator-hudi/pull/1143
 
 
   ## What is the purpose of the pull request
   
   Fix out of limits for results.
   
   ## Brief change log
   
     - Fix logic error
   
   ## Verify this pull request
   
   This pull request is a code cleanup without any test coverage.
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

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


With regards,
Apache Git Services

[GitHub] [incubator-hudi] vinothchandar commented on issue #1143: [MINOR] Fix out of limits for results

Posted by GitBox <gi...@apache.org>.
vinothchandar commented on issue #1143: [MINOR] Fix out of limits for results
URL: https://github.com/apache/incubator-hudi/pull/1143#issuecomment-569987256
 
 
   @smarthi please squash and merge so there is just the 1 commit on git history.. 

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


With regards,
Apache Git Services

[GitHub] [incubator-hudi] smarthi commented on a change in pull request #1143: [MINOR] Fix out of limits for results

Posted by GitBox <gi...@apache.org>.
smarthi commented on a change in pull request #1143: [MINOR] Fix out of limits for results
URL: https://github.com/apache/incubator-hudi/pull/1143#discussion_r362147928
 
 

 ##########
 File path: hudi-cli/src/main/java/org/apache/hudi/cli/commands/HoodieLogFileCommand.java
 ##########
 @@ -215,9 +215,11 @@ public String showLogFileRecords(
           if (n instanceof HoodieAvroDataBlock) {
             HoodieAvroDataBlock blk = (HoodieAvroDataBlock) n;
             List<IndexedRecord> records = blk.getRecords();
-            allRecords.addAll(records);
-            if (allRecords.size() >= limit) {
-              break;
+            for (IndexedRecord record : records) {
+              if (allRecords.size() >= limit) {
 
 Review comment:
   nitpick: reverse the if condition and avoid 'break'

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


With regards,
Apache Git Services

[GitHub] [incubator-hudi] lamber-ken commented on a change in pull request #1143: [MINOR] Fix out of limits for results

Posted by GitBox <gi...@apache.org>.
lamber-ken commented on a change in pull request #1143: [MINOR] Fix out of limits for results
URL: https://github.com/apache/incubator-hudi/pull/1143#discussion_r362153348
 
 

 ##########
 File path: hudi-cli/src/main/java/org/apache/hudi/cli/commands/HoodieLogFileCommand.java
 ##########
 @@ -215,9 +215,11 @@ public String showLogFileRecords(
           if (n instanceof HoodieAvroDataBlock) {
             HoodieAvroDataBlock blk = (HoodieAvroDataBlock) n;
             List<IndexedRecord> records = blk.getRecords();
-            allRecords.addAll(records);
-            if (allRecords.size() >= limit) {
-              break;
+            for (IndexedRecord record : records) {
+              if (allRecords.size() >= limit) {
 
 Review comment:
   Reasonable, 👍 

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


With regards,
Apache Git Services

[GitHub] [incubator-hudi] smarthi merged pull request #1143: [MINOR] Fix out of limits for results

Posted by GitBox <gi...@apache.org>.
smarthi merged pull request #1143: [MINOR] Fix out of limits for results
URL: https://github.com/apache/incubator-hudi/pull/1143
 
 
   

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


With regards,
Apache Git Services