Skip to content
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

[refactor](variant) refactor sub path push down on variant type (#36478) #36923

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

morrySnow
Copy link
Contributor

pick from master #36478

intro a new rule VARIANT_SUB_PATH_PRUNING to prune variant sub path.

for example, variant slot v in table t has two sub path: 'c1' and 'c2', after this rule, select v['c1'] from t will only scan one sub path 'c1' of v to reduce scan time.

This rule accomplishes all the work using two components. The Collector traverses from the top down, collecting all the element_at functions on the variant types, and recording the required path from the original variant slot to the current element_at. The Replacer traverses from the bottom up, generating the slots for the required sub path on scan, union, and cte consumer. Then, it replaces the element_at with the corresponding slot.

…he#36478)

pick from master apache#36478

intro a new rule VARIANT_SUB_PATH_PRUNING to prune variant sub path.

for example, variant slot v in table t has two sub path: 'c1' and 'c2',
after this rule, select v['c1'] from t will only scan one sub path 'c1'
of v to reduce scan time.

This rule accomplishes all the work using two components. The Collector
traverses from the top down, collecting all the element_at functions on
the variant types, and recording the required path from the original
variant slot to the current element_at. The Replacer traverses from the
bottom up, generating the slots for the required sub path on scan,
union, and cte consumer. Then, it replaces the element_at with the
corresponding slot.
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@morrySnow
Copy link
Contributor Author

run buildall

@morrySnow morrySnow merged commit a05d5cc into apache:branch-2.1 Jun 27, 2024
21 of 22 checks passed
@morrySnow morrySnow deleted the 2.1_36478 branch June 27, 2024 09:48
@yiguolei yiguolei mentioned this pull request Jul 19, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants