dcapwell commented on code in PR #46:
URL: https://github.com/apache/cassandra-accord/pull/46#discussion_r1204730614


##########
accord-core/src/main/java/accord/topology/Topology.java:
##########
@@ -258,16 +260,36 @@ private <P1> int[] subsetFor(Unseekables<?, ?> select, 
IndexedPredicate<P1> pred
                     if (abi < 0)
                     {
                         if (ailim < as.size())
-                            throw new IllegalArgumentException("Range not 
found for " + as.get(ailim));
+                        {
+                            switch (onUnknown)
+                            {
+                                case REJECT: throw new 
IllegalArgumentException("Range not found for " + as.get(ailim));
+                                case IGNORE:
+                                    break;
+                                default:
+                                    throw new 
IllegalArgumentException("Unknown option: " + onUnknown);
+                            }
+                        }
                         break;
                     }
 
                     ai = (int)abi;
+                    boolean skip = false;
                     if (ailim < ai)
-                        throw new IllegalArgumentException("Range not found 
for " + as.get(ailim));
+                    {
+                        switch (onUnknown)
+                        {
+                            default:
+                                throw new IllegalArgumentException("Unknown 
option: " + onUnknown);
+                            case REJECT: throw new 
IllegalArgumentException("Range not found for " + as.get(ailim));
+                            case IGNORE:
+                                bi = (int)(abi >>> 32);

Review Comment:
   I have been holding off touching this class until we know what to actually 
do... let me debug this more and maybe ask benedict



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to