-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Enhancement] Make str_to_date and str2date function can parse format only with year and month #52218
Conversation
… only with year and month Signed-off-by: duanyyyyyyy <[email protected]>
04dad4d
to
9d43561
Compare
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 10 / 10 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
sorry, can't be supported only on FE, should supported on BE too. Consider this scenario:
|
thanks for contributing! but would you mind me asking for some details first? which function do you use in trino? I recommend you use year, month, and concat function to extract year and week. |
How about just change the str_to_date? I checked the code the MV will use str2date function |
I will add some UT for BE |
[Enhancement] Make str_to_date and str2date function can parse format only with year and month
Why I'm doing:
StarRocks will not support select str_to_date('202410', '%Y%m') query but in trino it can work
What I'm doing:
Set the parseDefaulting for MONTH_OF_YEAR and DAY_OF_MONTH in unixDatetimeFormatBuilder when the pattern is year or year month format pattern
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: