korlov42 commented on code in PR #1743: URL: https://github.com/apache/ignite-3/pull/1743#discussion_r1124543984
########## modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/PlannerHelper.java: ########## @@ -108,4 +136,49 @@ public static IgniteRel optimize(SqlNode sqlNode, IgnitePlanner planner) { throw ex; } } + + /** + * A shuttle to estimate a biggest join to optimize. + * + * <p>There are only two rules: <ol> + * <li>Each achievable leaf node contribute to join complexity, thus must be counted</li> + * <li>If this shuttle reach the {@link LogicalCorrelate} node, only left shoulder will be + * analysed by this shuttle. For right shoulder a new shuttle will be created, and maximum + * of previously found subquery and current one will be saved</li> + * </ol> + */ + public static class JoinSizeFinder extends RelHomogeneousShuttle { Review Comment: yep, it definitely should be private class. Good catch! ########## modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/framework/TestBuilders.java: ########## @@ -311,6 +311,18 @@ private static class TableBuilderImpl extends AbstractTableBuilderImpl<TableBuil /** {@inheritDoc} */ @Override public TestTable build() { + if (distribution == null) { + throw new IllegalArgumentException("distribution is not specified"); Review Comment: fixed -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org