You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "orionlibs (via GitHub)" <gi...@apache.org> on 2023/06/28 13:39:10 UTC

[GitHub] [commons-lang] orionlibs opened a new pull request, #1068: calculate the left-difference between 2 arrays

orionlibs opened a new pull request, #1068:
URL: https://github.com/apache/commons-lang/pull/1068

   Created methods that calculate the left-difference between 2 arrays. For example for {1, 2, 3, 4}-{1, 6, 8, 3}={2, 4}.
   These methods could be useful in several scenarios:
   1--Data Analysis: When dealing with large datasets, you may need to compare two arrays of data to identify the differences between them. This method can help you find the elements that exist in one dataset but not in the other, enabling you to analyze the discrepancies and make informed decisions based on the results.
   2--Database Operations: In database operations, you might have two arrays representing different sets of data, such as database records or query results. By using this method, you can identify the elements that are present in one array but missing in the other, helping you detect anomalies, perform data synchronization, or handle data migrations effectively.
   3--Set Operations: The method can be used to perform set operations, such as finding the relative complement of two sets. It helps you determine the elements that belong to the first set but not to the second set, providing you with a new array containing the unique elements.
   4--Filtering: In some cases, you may have a large dataset and want to filter out specific elements based on a comparison with another dataset. This method can help you identify and extract the elements that are present in the first array but not in the second, allowing you to create a new filtered array.


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

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-lang] garydgregory commented on pull request #1068: calculate the left-difference between 2 arrays

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1068:
URL: https://github.com/apache/commons-lang/pull/1068#issuecomment-1611489471

   -1: Set operations belong, IMO in Apache Commons Numbers or Apache Commons Math. Otherwise, this opens the door for all set operations. What do others think?


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

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-lang] orionlibs commented on pull request #1068: calculate the left-difference between 2 arrays

Posted by "orionlibs (via GitHub)" <gi...@apache.org>.
orionlibs commented on PR #1068:
URL: https://github.com/apache/commons-lang/pull/1068#issuecomment-1611617905

   @garydgregory you spotted it immediately. That is exactly what I was planning. I have a list of about 60 array-related operations. This one I just did for this PR was just the first. I think I should put these in commons math. I am closing this PR


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

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-lang] orionlibs closed pull request #1068: calculate the left-difference between 2 arrays

Posted by "orionlibs (via GitHub)" <gi...@apache.org>.
orionlibs closed pull request #1068: calculate the left-difference between 2 arrays
URL: https://github.com/apache/commons-lang/pull/1068


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

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-lang] orionlibs commented on pull request #1068: calculate the left-difference between 2 arrays

Posted by "orionlibs (via GitHub)" <gi...@apache.org>.
orionlibs commented on PR #1068:
URL: https://github.com/apache/commons-lang/pull/1068#issuecomment-1611642769

   @aherbert you are right. It was supposed to be an array operation and not a set operation. But it is OK. I closed this PR. I will implement set theory and vector stuff in commons math/numbers slowly in time. Thank you for the feedback anyway


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

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-lang] codecov-commenter commented on pull request #1068: calculate the left-difference between 2 arrays

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1068:
URL: https://github.com/apache/commons-lang/pull/1068#issuecomment-1611449282

   ## [Codecov](https://app.codecov.io/gh/apache/commons-lang/pull/1068?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#1068](https://app.codecov.io/gh/apache/commons-lang/pull/1068?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (756bb6f) into [master](https://app.codecov.io/gh/apache/commons-lang/commit/f4665d0bc604ed9bb1aae3c93e99d4eee5027c1a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (f4665d0) will **increase** coverage by `0.00%`.
   > The diff coverage is `92.85%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##             master    #1068    +/-   ##
   ==========================================
     Coverage     92.07%   92.08%            
   - Complexity     7501     7557    +56     
   ==========================================
     Files           194      194            
     Lines         15743    15855   +112     
     Branches       2902     2934    +32     
   ==========================================
   + Hits          14496    14600   +104     
     Misses          674      674            
   - Partials        573      581     +8     
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/commons-lang/pull/1068?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...main/java/org/apache/commons/lang3/ArrayUtils.java](https://app.codecov.io/gh/apache/commons-lang/pull/1068?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvbGFuZzMvQXJyYXlVdGlscy5qYXZh) | `95.55% <92.85%> (-0.16%)` | :arrow_down: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


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

To unsubscribe, e-mail: notifications-unsubscribe@commons.apache.org

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


[GitHub] [commons-lang] orionlibs commented on pull request #1068: calculate the left-difference between 2 arrays

Posted by "orionlibs (via GitHub)" <gi...@apache.org>.
orionlibs commented on PR #1068:
URL: https://github.com/apache/commons-lang/pull/1068#issuecomment-1611618358

   @garydgregory you spotted it immediately. That is exactly what I was planning. I have a list of about 60 array-related operations. This one I just did for this PR was just the first. I think I should put these in commons math. I am closing this PR


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

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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


[GitHub] [commons-lang] aherbert commented on pull request #1068: calculate the left-difference between 2 arrays

Posted by "aherbert (via GitHub)" <gi...@apache.org>.
aherbert commented on PR #1068:
URL: https://github.com/apache/commons-lang/pull/1068#issuecomment-1611626296

   Note that this is not returning distinct elements from array 1 so is not a strict set operation. E.g. The provided code will compute:
   ```
   {1, 2, 3, 4, 4} - {1, 6, 8, 3} = {2, 4, 4}
   ```


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

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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