You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ldadima (via GitHub)" <gi...@apache.org> on 2026/03/27 07:29:41 UTC

[PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

ldadima opened a new pull request, #27839:
URL: https://github.com/apache/flink/pull/27839

   ## What is the purpose of the change
   
   Add rule to transform binary multi join (with 2 inputs) back to regular join. 
   
   ## Verifying this change
   
   Run MultiJoinTest#testThreeWayInnerJoinRelPlanNoCommonJoinKeyAllowedBinaryMultiJoin
   
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: ( no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? ( no)
     - If yes, how is the feature documented? (not applicable)
   


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

Posted by "ldadima (via GitHub)" <gi...@apache.org>.
ldadima commented on code in PR #27839:
URL: https://github.com/apache/flink/pull/27839#discussion_r3013383091


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/config/OptimizerConfigOptions.java:
##########
@@ -368,6 +368,16 @@ public class OptimizerConfigOptions {
                                                     + "These might break savepoint compatibility across Flink versions and the goal is to have a stable version in the next release.")
                                     .build());
 
+    @Documentation.TableOption(execMode = Documentation.ExecMode.STREAMING)
+    public static final ConfigOption<Boolean> TABLE_OPTIMIZER_USE_MULTI_JOIN_FOR_BINARY_JOIN =
+            key("table.optimizer.multi-join.use-for-binary-join")
+                    .booleanType()
+                    .defaultValue(false)

Review Comment:
   There is no full certainty yet that a multi join with 2 inputs is always worse. False - the default value, as within the nexmark queries no benefits were observed in BinaryMultiJoin
   Also, it occurred to me that the option would add more flexibility in using multi join optimization. But, in principle, I do not consider the addition of this option to be necessary.



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #27839:
URL: https://github.com/apache/flink/pull/27839#issuecomment-4140735471

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7f3367e3e613b482293210d0c3ce6abe89972b28",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7f3367e3e613b482293210d0c3ce6abe89972b28",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7f3367e3e613b482293210d0c3ce6abe89972b28 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

Posted by "ldadima (via GitHub)" <gi...@apache.org>.
ldadima commented on code in PR #27839:
URL: https://github.com/apache/flink/pull/27839#discussion_r3013383091


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/config/OptimizerConfigOptions.java:
##########
@@ -368,6 +368,16 @@ public class OptimizerConfigOptions {
                                                     + "These might break savepoint compatibility across Flink versions and the goal is to have a stable version in the next release.")
                                     .build());
 
+    @Documentation.TableOption(execMode = Documentation.ExecMode.STREAMING)
+    public static final ConfigOption<Boolean> TABLE_OPTIMIZER_USE_MULTI_JOIN_FOR_BINARY_JOIN =
+            key("table.optimizer.multi-join.use-for-binary-join")
+                    .booleanType()
+                    .defaultValue(false)

Review Comment:
   There is no full certainty yet that a multi join with 2 inputs is always worse. False - the default value, as within the nexmark queries no benefits were observed in BinaryMultiJoin
   Also, it occurred to me that the option would add more flexibility in using multi join optimization. But, in principle, I do not consider the addition of this option to be necessary.
   
   What do you think? Should this config option be removed?



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27839:
URL: https://github.com/apache/flink/pull/27839#issuecomment-4955466060

   This PR is being marked as stale since it has not had any activity in the last 90 days. 
   If you would like to keep this PR alive, please leave a comment asking for a review. 
   If the PR has merge conflicts, update it with the latest from the base branch.
   
   If you are having difficulty finding a reviewer, please reach out to the 
   community, contact details can be found here: https://flink.apache.org/what-is-flink/community/
   
   If this PR is no longer valid or desired, please feel free to close it. 
   If no activity occurs in the next 30 days, it will be automatically closed.


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27839:
URL: https://github.com/apache/flink/pull/27839#issuecomment-6119397861

   This PR is being marked as stale since it has not had any activity in the last 90 days. 
   If you would like to keep this PR alive, please leave a comment asking for a review. 
   If the PR has merge conflicts, update it with the latest from the base branch.
   
   If you are having difficulty finding a reviewer, please reach out to the 
   community, contact details can be found here: https://flink.apache.org/what-is-flink/community/
   
   If this PR is no longer valid or desired, please feel free to close it. 
   If no activity occurs in the next 30 days, it will be automatically closed.


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

Posted by "ldadima (via GitHub)" <gi...@apache.org>.
ldadima commented on PR #27839:
URL: https://github.com/apache/flink/pull/27839#issuecomment-4241246731

   @snuyanzin @gustavodemorais 
   Can you check the pull request, please?


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

Posted by "github-actions[bot] (via GitHub) via issues" <is...@flink.apache.org>.
github-actions[bot] closed pull request #27839: [FLINK-39340][table] Add BinaryMultiJoinToJoinRule
URL: https://github.com/apache/flink/pull/27839


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #27839:
URL: https://github.com/apache/flink/pull/27839#discussion_r3008065491


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/config/OptimizerConfigOptions.java:
##########
@@ -368,6 +368,16 @@ public class OptimizerConfigOptions {
                                                     + "These might break savepoint compatibility across Flink versions and the goal is to have a stable version in the next release.")
                                     .build());
 
+    @Documentation.TableOption(execMode = Documentation.ExecMode.STREAMING)
+    public static final ConfigOption<Boolean> TABLE_OPTIMIZER_USE_MULTI_JOIN_FOR_BINARY_JOIN =
+            key("table.optimizer.multi-join.use-for-binary-join")
+                    .booleanType()
+                    .defaultValue(false)

Review Comment:
   Just checking your thinking. Is there a downside of using a binary join? I wonder:
   - do we need an option - why not just add the optimization
   - if we need the option should the default be true?



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39340][table] Add BinaryMultiJoinToJoinRule [flink]

Posted by "github-actions[bot] (via GitHub) via issues" <is...@flink.apache.org>.
github-actions[bot] commented on PR #27839:
URL: https://github.com/apache/flink/pull/27839#issuecomment-6816471841

   This PR has been closed since it has not had any activity in 120 days. 
   If you feel like this was a mistake, or you would like to continue working on it, 
   please feel free to re-open the PR and ask for a review.


-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org