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

SQL: Implement to_char(date/time/datetime, pattern) #54964

Closed
matriv opened this issue Apr 8, 2020 · 31 comments
Closed

SQL: Implement to_char(date/time/datetime, pattern) #54964

matriv opened this issue Apr 8, 2020 · 31 comments
Labels
:Analytics/SQL SQL querying >enhancement good first issue low hanging fruit Team:QL (Deprecated) Meta label for query languages team

Comments

@matriv
Copy link
Contributor

matriv commented Apr 8, 2020

Implement to_char according to the PostgreSQL spec: https://www.postgresql.org/docs/9.1/functions-formatting.html by translating to the java.time patterns used in DATETIME_FORMAT.
Follows: #54832

@matriv matriv added >enhancement good first issue low hanging fruit :Analytics/SQL SQL querying labels Apr 8, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (:Query Languages/SQL)

@avirlrma
Copy link

Hi, Can I start working on this?

@matriv
Copy link
Contributor Author

matriv commented Apr 10, 2020

@avirlrma Sure, go ahead!

@rjernst rjernst added the Team:QL (Deprecated) Meta label for query languages team label May 4, 2020
@Boda805
Copy link

Boda805 commented May 7, 2020

@avirlrma Are you still working on this? I would like to if not.

@matriv
Copy link
Contributor Author

matriv commented May 21, 2020

@Boda805 Since there is no response for some time, feel free to take it over if you want.

@Kasula11
Copy link

Hi matriv, I am new to open source. Can I take this?. Can you please tell me where to implement?

@matriv
Copy link
Contributor Author

matriv commented May 22, 2020

@Boda805 Are you still interested in taking this?

@Boda805
Copy link

Boda805 commented May 22, 2020

@matriv Yes but I'm pretty busy for the next couple weeks, if @Kasula11 wants to take that's fine, I could still try to help out as well when I have time.

@Kasula11
Copy link

Kasula11 commented May 25, 2020

Thanks. When I am trying to import project as existing gradle project in eclipse. then it is showing me error.

Caused by: org.gradle.api.GradleException: At least Java 11 is required to build elasticsearch gradle tools
at build_6mm40yswivqsuj1oqx64fwsng.run(C:\Users\karthik\elasticsearch\buildSrc\build.gradle:66)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
... 155 more

Even though I have download Java 11 and Set JAVA_HOME to C:\Program Files\Java\jdk-11.0.6

Please Help me regarding this

@Boda805
Copy link

Boda805 commented May 25, 2020

@Kasula11 use Java 14 I had the same problem at first. I believe it's in the documentation somewhere.

@Kasula11
Copy link

Kasula11 commented May 26, 2020

@matriv I just want to know whether my understanding is correct or not regarding implementation of to_char() function. For example if i am going to implement to_char function for converting time stamp to string than the arguments that are passed to to_char function are timestamp and pattern which are of Expression Type.

Using DATETIME_FORMAT(DateTimeFormat class) I am going to getting the Desired format for particular timestamp and return string version of it?

@cheng141
Copy link

I Just want to you

@z13z
Copy link

z13z commented Jun 13, 2020

Hi, if it's possible I would like to start working on this issue.

@grgAditya
Copy link

Hi is someone working on this or I can take this up?

@devanandch
Copy link

Hi, can i work on this item please

@devanandch
Copy link

any update on my request

@matriv
Copy link
Contributor Author

matriv commented Jul 13, 2020

@devanandch Sorry for the delay, go ahead and please use the same approach as in #55454

@syedsouban
Copy link

Hi @devanandch let me know if you are working on it, otherwise I would like to work on it. Thanks!

@devanandch
Copy link

Hi @syedsouban i am working on it.

@devanandch
Copy link

@devanandch Sorry for the delay, go ahead and please use the same approach as in #55454

Thank you Matriv, I will make sure to get the PR submitted soon.

@SrihariShastry
Copy link

SrihariShastry commented Sep 2, 2020

Hi, is anyone working on this or can I take this up?

@bpintea
Copy link
Contributor

bpintea commented Sep 21, 2020

Hi. Thank you for your interest in contributing!
Inline with common open source practices, we would like to no longer block and attribute issues, but rather invite anyone with a concrete proposal to simply submit a PR. No one likes duplicating work, but please consider that chances of concurrent PRs are low - especially for longer standing issues - and quality will trump over submission order.

@philkra
Copy link
Contributor

philkra commented Sep 28, 2020

@mohammedtabish, please refer to one of the previous comments #54964 (comment)

@matriv
Copy link
Contributor Author

matriv commented Sep 28, 2020

Please try to use the pattern of a similar PR: #62701

@pspranjal444
Copy link

Hi @matriv. I am new to open source. Can you please provide more context on what exactly to do ? I have to add to_char() in DateTimeFormatProcessor.java file. Is that correct ?

@matriv
Copy link
Contributor Author

matriv commented Oct 5, 2020

@pspranjal444 The implementation is pretty straight forward, please look at my previous comment and follow the pattern for implementing another flavour of this function.

@LahiruSen
Copy link

Implement to_char according to the PostgreSQL spec: https://www.postgresql.org/docs/9.1/functions-formatting.html by translating to the java.time patterns used in DATETIME_FORMAT.
Follows: #54832

Hi @matriv , I would like to work on this issue.

vonsowic pushed a commit to vonsowic/elasticsearch that referenced this issue Oct 14, 2020
Implement to_char according to the PostgreSQL spec: https://www.postgresql.org/docs/9.1/functions-formatting.html by translating to the java.time patterns used in DATETIME_FORMAT.
Follows: elastic#54832
vonsowic pushed a commit to vonsowic/elasticsearch that referenced this issue Oct 15, 2020
Implement to_char according to the PostgreSQL spec: https://www.postgresql.org/docs/9.1/functions-formatting.html by translating to the java.time patterns used in DATETIME_FORMAT.
Follows: elastic#54832
vonsowic added a commit to vonsowic/elasticsearch that referenced this issue Oct 15, 2020
Implement to_char according to the PostgreSQL spec: https://www.postgresql.org/docs/9.1/functions-formatting.html by translating to the java.time patterns used in DATETIME_FORMAT.
Follows: elastic#54832
vonsowic added a commit to vonsowic/elasticsearch that referenced this issue Oct 15, 2020
Implement to_char according to the PostgreSQL spec: https://www.postgresql.org/docs/9.1/functions-formatting.html by translating to the java.time patterns used in DATETIME_FORMAT.
Follows: elastic#54832
palesz pushed a commit to palesz/elasticsearch that referenced this issue Dec 17, 2020
Implement to_char according to the PostgreSQL spec: https://www.postgresql.org/docs/9.1/functions-formatting.html by translating to the java.time patterns used in DATETIME_FORMAT.
Follows: elastic#54832
@rakeshmissioncode
Copy link

I'd like to start contributing to this issue.
Any hints on which part of the code I should start with, for this issue?

@matriv
Copy link
Contributor Author

matriv commented Feb 1, 2021

@rakeshmissioncode

Hi. Thank you for your interest in contributing!
As you can see the feature has already been implemented: #66486

For the future and inline with common open source practices, we would like to no longer block and attribute issues, but rather invite anyone with a concrete proposal to simply submit a PR. No one likes duplicating work, but please consider that chances of concurrent PRs are low - especially for longer standing issues - and quality will trump over submission order.

@matriv
Copy link
Contributor Author

matriv commented Feb 3, 2021

Implemented with #66486

@matriv matriv closed this as completed Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/SQL SQL querying >enhancement good first issue low hanging fruit Team:QL (Deprecated) Meta label for query languages team
Projects
None yet
Development

No branches or pull requests