zhuzhurk commented on code in PR #25593: URL: https://github.com/apache/flink/pull/25593#discussion_r1896476697
########## flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/join/adaptive/AdaptiveJoin.java: ########## @@ -44,30 +43,17 @@ public interface AdaptiveJoin extends Serializable { StreamOperatorFactory<?> genOperatorFactory(ClassLoader classLoader, ReadableConfig config); /** - * Enrich the input data sizes and checks for broadcast support. + * Get the join type of the join operator. * - * @param leftInputBytes The size of the left input in bytes. - * @param rightInputBytes The size of the right input in bytes. - * @param threshold The threshold for enabling broadcast hash join. - * @param checkAndTransformEdges Check and transform the upstream edges of the join node to - * broadcast partitioner and forward partitioner respectively if the condition matches; - * otherwise, the edges will not be transformed and return false. - * @return A Tuple2 instance. The first element of tuple is true if join can convert to - * broadcast hash join, false else. The second element of tuple is true if left side is - * smaller, false else. + * @return the join type. */ - Tuple2<Boolean, Boolean> tryBroadcastOptimization( - Long leftInputBytes, - Long rightInputBytes, - Long threshold, - Function<Boolean, Boolean> checkAndTransformEdges); + FlinkJoinType getJoinType(); /** - * Return whether the left input side is the build side in a join operation. It is specifically - * relevant for join types that are hash join. If the join type is sort merge join, this method - * will always return true. + * Determine whether the adaptive join operator can be optimized as broadcast hash join. * - * @return true if the left input side is the build side, false else. + * @param canBeBroadcast whether the join operator can be optimized to broadcast hash join. + * @param leftIsBuild whether the left input side is the build side. */ - boolean isLeftBuild(); + void determineBroadcastOptimization(boolean canBeBroadcast, boolean leftIsBuild); Review Comment: maybe `markAsBroadcastJoin`? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org