jadewang-db opened a new pull request, #3097:
URL: https://github.com/apache/arrow-adbc/pull/3097

   
   
     ## Summary
     - Fixed failing unit tests in CloudFetchResultFetcherTest by correcting 
the conditional logic for processing initial results
     - The fetcher now properly handles initial results regardless of the 
`HasDirectResults` flag state
   
     ## Problem
     Two unit tests were failing:
     - `InitialResults_ProcessesInitialResultsCorrectly`
     - `InitialResults_WithMoreRows_ContinuesFetching`
   
     The issue was in the condition that checks whether to process 
direct/initial results. The previous logic required
     `_statement.HasDirectResults` to be true even when processing initial 
results passed to the constructor, which
     prevented the initial results from being processed in test scenarios.
   
     ## Solution
     Changed the conditional logic from:
     ```csharp
     if (_statement.HasDirectResults &&
         (_statement.DirectResults?.ResultSet?.Results?.ResultLinks?.Count > 0 
||
         _initialResults?.Results?.ResultLinks?.Count > 0))
   
     To:
     if ((_statement.HasDirectResults && 
_statement.DirectResults?.ResultSet?.Results?.ResultLinks?.Count > 0) ||
         _initialResults?.Results?.ResultLinks?.Count > 0)
   
     This ensures that initial results are processed when provided, regardless 
of the HasDirectResults flag.
   
     Test plan
   
     - All 12 tests in CloudFetchResultFetcherTest pass
     - No regression in other CloudFetch-related tests
     - Verified the fetcher correctly processes both direct results and initial 
results scenarios


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