Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSQL: Implement DATE_FORMAT function #55065
Comments
|
Pinging @elastic/es-ql (:Query Languages/SQL) |
|
Hi. Can I start working on this? |
|
@erickmp07 Yes, sure, thank you! |
|
Is it possible to start working on it? |
|
@MohamedBechir I'm working on it. |
|
Hi Can I take this one ? |
|
Hi, @chitranshi21 . |
|
Hi, @erickmp07 saw that you're assigned to this issue two months ago. Are you still working on this? If not, please let me know, I would like to take it |
|
Hi @erickmp07 , is this issue still available ? Can I please start working on it ?Please let me know |
|
Hi, @Anyrob and @Anushka9833 . |
|
@Anyrob I've assigned you. |
|
Hey @matriv! I was making some changes to the code but then I realized something. Would you mind being more specific in the difference of the DateTimeFormat with the DateFormat, I want to be sure that I'm on the right path, I discovered that my previous analysis looked a lot like the DatePart function, so this difference doesn't seem so trivial to me now, and I would like to make it clear before continuing :) |
|
|
|
Thank you! I think I got it now! I let you know in case I have another doubt. |
|
@Anyrob There is a similar PR open that addresses the MS-SQL variant of the function, so you'll only need to add the new function definition, and a new Formatter to implement the MySQL variant. |
|
Thank you @matriv I'm still working on it, I have a few doubts about the translation of specific symbols as:
|
I'd say yes, but we need to properly document that they would all result in computing the week starting from Monday (If I remember correctly for Java's
I think you can simply use |
|
Thank you @matriv! I keep you up to date |
|
Hey, @matriv! I just wanted to update you: I'm trying to write a test for my code based on DateTimeFormatProcessor. Today I'll make my PR, I would like that you could check it, to see If I have made the correct approach or if I need to make changes :) |
Implement
DATE_FORMATaccording to the MySQL spec: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-format by translating to the java.time patterns used inDATETIME_FORMAT.Follows: #54832