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

[Feature] Support jodatime_format function to partition pruning #52620

Merged
merged 19 commits into from
Nov 14, 2024

Conversation

renzhimin7
Copy link
Contributor

@renzhimin7 renzhimin7 commented Nov 5, 2024

Why I'm doing:

  1. hive 外表testDb.testTable 分区字段是dt ,有6个分区
    dt=20241101
    dt=20241102
    dt=20241103
    dt=20241104
    dt=20241105
    dt=20241106
  2. 在执行下面SQL时,无法执行分区裁剪
    select * from flight.zhimin_t where dt = jodatime_format('2024-11-02 15:58:51', 'yyyyMMdd')
image

What I'm doing:

增加jodatime_format转换方法
验证可以裁剪
image

Fixes #52680

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
  • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

@renzhimin7 renzhimin7 requested a review from a team as a code owner November 5, 2024 07:34
@renzhimin7 renzhimin7 changed the title Support jodatime_format function to partition pruning [Feature] Support jodatime_format function to partition pruning Nov 5, 2024
Signed-off-by: zhiminr.ren <1240388654@qq.com>
Signed-off-by: zhiminr.ren <1240388654@qq.com>
Signed-off-by: zhiminr.ren <1240388654@qq.com>
Astralidea
Astralidea previously approved these changes Nov 5, 2024
Seaven
Seaven previously approved these changes Nov 6, 2024
@Astralidea Astralidea enabled auto-merge (squash) November 6, 2024 19:01
auto-merge was automatically disabled November 7, 2024 04:36

Head branch was pushed to by a user without write access

@renzhimin7 renzhimin7 dismissed stale reviews from Seaven and Astralidea via 76f878b November 7, 2024 04:36
Signed-off-by: zhiminr.ren <1240388654@qq.com>
trueeyu
trueeyu previously approved these changes Nov 7, 2024
Seaven
Seaven previously approved these changes Nov 7, 2024
@trueeyu
Copy link
Contributor

trueeyu commented Nov 7, 2024

@Mergifyio rebase main

Copy link
Contributor

mergify bot commented Nov 7, 2024

rebase main

✅ Branch has been successfully rebased

Signed-off-by: zhiminr.ren <1240388654@qq.com>
@renzhimin7 renzhimin7 dismissed stale reviews from trueeyu and Seaven via f0cd76f November 7, 2024 11:19
Signed-off-by: zhiminr.ren <1240388654@qq.com>
Signed-off-by: zhiminr.ren <1240388654@qq.com>
Signed-off-by: zhiminr.ren <1240388654@qq.com>
Signed-off-by: zhiminr.ren <1240388654@qq.com>
@Astralidea Astralidea enabled auto-merge (squash) November 10, 2024 16:22
Signed-off-by: zhiminr.ren <1240388654@qq.com>
auto-merge was automatically disabled November 12, 2024 01:38

Head branch was pushed to by a user without write access

Copy link

@Youngwb Youngwb enabled auto-merge (squash) November 12, 2024 02:17
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 9 / 9 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/sql/optimizer/rewrite/ScalarOperatorFunctions.java 9 9 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@Youngwb Youngwb merged commit f0ef59e into StarRocks:main Nov 14, 2024
53 checks passed
@murphyatwork
Copy link
Contributor

@mergify backport branch-3.3 branch-3.2

Copy link
Contributor

mergify bot commented Nov 15, 2024

backport branch-3.3 branch-3.2

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 15, 2024
Signed-off-by: zhiminr.ren <1240388654@qq.com>
(cherry picked from commit f0ef59e)
mergify bot pushed a commit that referenced this pull request Nov 15, 2024
Signed-off-by: zhiminr.ren <1240388654@qq.com>
(cherry picked from commit f0ef59e)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rewrite/ScalarOperatorFunctions.java
murphyatwork pushed a commit that referenced this pull request Nov 15, 2024
Signed-off-by: zhiminr.ren <1240388654@qq.com>
(cherry picked from commit f0ef59e)
Signed-off-by: Murphy <mofei@starrocks.com>

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rewrite/ScalarOperatorFunctions.java
wanpengfei-git pushed a commit that referenced this pull request Nov 15, 2024
…port #52620) (#52916)

Co-authored-by: renzhimin7 <1240388654@qq.com>
wanpengfei-git pushed a commit that referenced this pull request Nov 15, 2024
…port #52620) (#52915)

Co-authored-by: renzhimin7 <1240388654@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support jodatime_format function to partition pruning
6 participants