Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AE_1 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: AE
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
AE_1 #3
Changes from 1 commit
93f559206a3b6af982ca0556d83e35f9163180f9697143e9d7e3eb3c169d9ad7bb1dabdd518a1ab76900ecaa495b14a26edbd90e5bfc55695a140b747722651ab3d3e543577a9b7679abd00f103b8ae2320278e79b1f6c82ea9792678e1acbdf328455276d3877f82cec506bd403c8d53bc83dec8ac6ae42e8c3897949230bf6c77b1a724b90c77ea0a37da682c1ac405cf81ecbe92307d5f6e84e1d859bd7df6ba3bbca95c67a9ad81136957d6fbfbd8da3779e36e2570b8f3a63e7b229204386daa78305b68d53238e3d8edae9419b63c5f372609f69998a29b3eb66c1f7ba524d1be362e472160e5839c481c793139af2d8838d3dda58ad25e4431b604c19ccae0c860f4498a27952cd815aee3e33d85217f7be408e05db1c5b156448c65960a82f6888f712640d6c04ad176d45e6e5a116e681d377d114d0de86100dfd72571e218341c4d693ac3c0bb6bbefca98428eb2a4b3fe3a834b86008f74ad61c443a5ad036004d8e3a98c0ca77c8f475a888d206692bac3d6b44daa0d4ca98ecda3305e9b58e76d66d6a5f858dd29febba506f81addaaceff0c8c7bfb4c0a02d5c90a8103a5a24d91008ab00523f5e827383a7c7fccff89cdeca1c1dd3add287f68496c1f2adb615bef4fee0054b8e63243de6d3e7d240817b0996b7c89c92ccc0b9db1c036836b1a9b5e9937361f7455615f0ddd22bf4d97001d3095da558739a0493d37118079b05484bdfda9d4065488be4d2456967b72a30deb88b074f40711eee2dbafd05372d1f65dc9527e42c14419e1d36440e689cebf4bccb860e15a3195969b8a1af1190980e6bc0037bbb4ab5b5ba17851c737f0899d8e9b3b305d71fe039fa61133cb468d25ea927c76868e02571183b2669e8a198be8951a641525102ccc5fb5a026f35ede29a7d2d72a572fb711382c1011822783e4ce103c4a32515d2311f32feb42bb4dbbba8049c062be853afb2d01bcc1a4723373c7b12b316ebfc7daa9569556382f8a938270916f98e831d1f1d98c7f0c2c94a9d0543487eb87df45f8a83967c51a6ba0d9e4cf650ebf3aae382c919e17ace00ebd53587a9a5b370923bd77aa4ff2b94c01152d09b0548985f9663f8007163fece952c7616115fecfbafc7acabc937b33b50391081a3fa77505d4a2311cb45ff022c559855819826ea93dbf068ef944e6970241f3a90666bf76e4bfc22bef8ab82d6f110fd413d4028b0ac2e08778File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
LogicalPlanto a field## What changes were proposed in this pull request? The existing query hint implementation relies on a logical plan node `ResolvedHint` to store query hints in logical plans, and on `Statistics` in physical plans. Since `ResolvedHint` is not really a logical operator and can break the pattern matching for existing and future optimization rules, it is a issue to the Optimizer as the old `AnalysisBarrier` was to the Analyzer. Given the fact that all our query hints are either 1) a join hint, i.e., broadcast hint; or 2) a re-partition hint, which is indeed an operator, we only need to add a hint field on the Join plan and that will be a good enough solution for the current hint usage. This PR is to let `Join` node have a hint for its left sub-tree and another hint for its right sub-tree and each hint is a merged result of all the effective hints specified in the corresponding sub-tree. The "effectiveness" of a hint, i.e., whether that hint should be propagated to the `Join` node, is currently consistent with the hint propagation rules originally implemented in the `Statistics` approach. Note that the `ResolvedHint` node still has to live through the analysis stage because of the `Dataset` interface, but it will be got rid of and moved to the `Join` node in the "pre-optimization" stage. This PR also introduces a change in how hints work with join reordering. Before this PR, hints would stop join reordering. For example, in "a.join(b).join(c).hint("broadcast").join(d)", the broadcast hint would stop d from participating in the cost-based join reordering while still allowing reordering from under the hint node. After this PR, though, the broadcast hint will not interfere with join reordering at all, and after reordering if a relation associated with a hint stays unchanged or equivalent to the original relation, the hint will be retained, otherwise will be discarded. For example, the original plan is like "a.join(b).hint("broadcast").join(c).hint("broadcast").join(d)", thus the join order is "a JOIN b JOIN c JOIN d". So if after reordering the join order becomes "a JOIN b JOIN (c JOIN d)", the plan will be like "a.join(b).hint("broadcast").join(c.join(d))"; but if after reordering the join order becomes "a JOIN c JOIN b JOIN d", the plan will be like "a.join(c).join(b).hint("broadcast").join(d)". ## How was this patch tested? Added new tests. Closes apache#23036 from maryannxue/query-hint. Authored-by: maryannxue <[email protected]> Signed-off-by: gatorsmile <[email protected]>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.