chucheng92 commented on PR #19654:
URL: https://github.com/apache/flink/pull/19654#issuecomment-1120757526

   @tweise Thanks for reviewing. And sorry i haven’t illustrate details clearly.
   
   Question-1: actual problem is == with Integer for readerIndex comparison.
   ```
           Integer i1 = 128;
           Integer i2 = 128;
           System.out.println(i1 == i2);
           int i3 = 128;
           int i4 = 128;
           System.out.println((Integer) i3 == (Integer) i4);
   ```
   
   It will show false, false.
   
   As hybrid source definition, it can concat with more than 2 child sources. 
so currently works just because Integer cache(only  works <=127), if we have 
more sources will fail on error.  In a word, we can't use == to compare Integer 
index unless we limit hybrid sources only works <=127.
   
   Question-2, the `e.getKey()` above will be null when we run any of cases in 
`HybridSourceSplitEnumeratorTest`.
   
   
![image](https://user-images.githubusercontent.com/11287509/167331025-18791a81-ceb0-451e-839e-2e1cfdae460d.png)
   
   currently works because here we cast sourceIndex to Integer. but if we want 
to solve the Question-1, then here may deal with this null. 
   
   Thanks.


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

Reply via email to