HanumathRao opened a new pull request, #3640:
URL: https://github.com/apache/calcite/pull/3640

   …tor code path
   
   This pull request includes the following modifications to address the Null 
Pointer Exception (NPE) when decorrelating a multi-level correlated subquery:
   
   - Eliminated the TrimUnusedFields in the Prepare phase, as the optimize call 
(in the same function) handles the trimming of unused fields as part of the 
standard program. Additionally, this code path is brought in line with the 
Optimize code path in the PlannerImpl, where the TrimUnusedFields flag is set 
to False. This ensures consistency between both code paths.
   
   - Implemented a call to the getCorrelationUse function in certain code 
paths. This call rectifies the rel node tree to standardize the correlated 
variables.
   
   - The fix introduced in response to 
[CALCITE-5683](https://issues.apache.org/jira/browse/CALCITE-5683) also 
addresses the identified issue in this JIRA.
   
   All of the aforementioned code changes are necessary to resolve the reported 
problem.
   
   result from sqlfiddle postgresql: 
https://sqlfiddle.com/postgresql/online-compiler?id=98100522-acf6-46b3-9b19-eb14b7015078


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