zstan commented on code in PR #12932:
URL: https://github.com/apache/ignite/pull/12932#discussion_r2994793142


##########
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQuerySplitter.java:
##########
@@ -1048,6 +1048,47 @@ private static String uniquePushDownColumnAlias(String 
uniqueTblAlias, String co
         return uniqueTblAlias + "__" + colName;
     }
 
+    /**
+     * Return table aliases whose WHERE conditions are safe to push down.
+     * For LEFT OUTER JOIN, only aliases from the left branch are safe.
+     */
+    private static Set<GridSqlAlias> tblAliasesToPushdownConditions(
+            SplitterQueryModel model,
+            int begin,
+            int end,
+            Set<GridSqlAlias> tblAliases
+    ) {
+        int leftBranchEnd = -1;
+
+        for (int i = 1; i <= end; i++) {
+            if (model.findJoin(i).isLeftOuter()) {
+                leftBranchEnd = i - 1;
+                break;
+            }
+        }
+
+        if (leftBranchEnd == -1)
+            return tblAliases;
+
+        Set<GridSqlAlias> aliases = U.newIdentityHashSet();
+
+        int safeBegin = begin;

Review Comment:
   redundant var



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