Add `to_date` function
Which issue does this PR close?
Closes #8987 .
Rationale for this change
What changes are included in this PR?
Add to_date function, and change the protobuf file
Are these changes tested?
Not now, but it should be added in this PR.
Are there any user-facing changes?
Add a function named to_date, users can use select to_date(1243124); to try it.
@Omega359 Hey! you can look it if you have time, I need you suggestion about the protobuf file and if there are something that i do not think about.
If it looks ok, I will write test code these days.
Thanks very much
I haven't had time to look it over yet but first thing I did see was the use of Date64 - I can't see any good reason to use that vs Date32
I haven't had time to look it over yet but first thing I did see was the use of Date64 - I can't see any good reason to use that vs Date32
Date64 contains more number in my opinion. Maybe Date32 is better?
Date64 contains more number in my opinion. Maybe Date32 is better?
/// A signed 32-bit date representing the elapsed time since UNIX epoch (1970-01-01)
/// in days (32 bits).
Date32,
/// A signed 64-bit date representing the elapsed time since UNIX epoch (1970-01-01)
/// in milliseconds (64 bits). Values are evenly divisible by 86400000.
Date64,
Date32 is the way.
Date64 contains more number in my opinion. Maybe Date32 is better?
/// A signed 32-bit date representing the elapsed time since UNIX epoch (1970-01-01) /// in days (32 bits). Date32, /// A signed 64-bit date representing the elapsed time since UNIX epoch (1970-01-01) /// in milliseconds (64 bits). Values are evenly divisible by 86400000. Date64,Date32 is the way.
Okey! I will change it to Date32 I may finish it these two days
@alamb @Omega359 This PR is ready to be reviewed
Hi @Tangruilin , could you add a function description in scalar_functions.md?
Hi @Tangruilin , could you add a function description in
scalar_functions.md?
I will do it today night
cc @Omega359 do you happen to have some time to give this PR a look?
Marking this PR as draft as it no longer seems to be waiting on feedback. Please mark it ready for review when it is ready for another look.
@Tangruilin - Do you think you'll have time to complete this PR before v36 is released?
@Tangruilin - Do you think you'll have time to complete this PR before v36 is released?
I will work with it today
@Tangruilin - Do you think you'll have time to complete this PR before v36 is released?
I will work with it today
Unfortunately, I think the 36.0.0 https://lists.apache.org/thread/jhhtz9csocdxx1fzb5ysswjnq79x2fr5 RC has already been cut (so unless we find some problem with RC1 and make a new RC, this issue will have to wait until the next release)
@Tangruilin - Do you think you'll have time to complete this PR before v36 is released?
I will work with it today
Unfortunately, I think the 36.0.0 https://lists.apache.org/thread/jhhtz9csocdxx1fzb5ysswjnq79x2fr5 RC has already been cut (so unless we find some problem with RC1 and make a new RC, this issue will have to wait until the next release)
I am working with it now. it is a pity
@Tangruilin - Do you think you'll have time to complete this PR before v36 is released?
I will work with it today
Unfortunately, I think the 36.0.0 https://lists.apache.org/thread/jhhtz9csocdxx1fzb5ysswjnq79x2fr5 RC has already been cut (so unless we find some problem with RC1 and make a new RC, this issue will have to wait until the next release)
congratulation to 36.0
@Tangruilin - Do you think you'll have time to complete this PR before v36 is released?
You can review it now
@Omega359 You can review this PR now, thanks
@Omega359 You can review this PR now, thanks
@Omega359 once you have reviewed this PR please let me know and I'll give it a final look too and hopefully merge it
Thank you for your work @Tangruilin
@Omega359 The cargo test --doc command is passed on my mac.
But the CI fail. I do not know why
@Omega359 The
cargo test --doccommand is passed on my mac. But the CI fail. I do not know why
I think it's because you are attempting to include /// # use datafusion::prelude::*; which isn't imported in that module. You can't import it either because of #9277. As mentioned in my review you'll have to ignore that doc test until we move the functions out of this module to the new datafusion/functions area.
I think this PR looks good to me -- thank you @Tangruilin and @Omega359
There are several cleanup suggestions left outstanding from @Omega359 related to fixing up repeated tests / comments. Is this something you have time to fix @Tangruilin before we merge the PR? Otherwise we can do it as a follow on PR
I think i can fix it in this PR
I think this PR looks good to me -- thank you @Tangruilin and @Omega359 There are several cleanup suggestions left outstanding from @Omega359 related to fixing up repeated tests / comments. Is this something you have time to fix @Tangruilin before we merge the PR? Otherwise we can do it as a follow on PR
I think i can fix it in this PR
Done