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: Extend DATE_TRUNC to also operate on intervals #46632

Closed
matriv opened this issue Sep 11, 2019 · 13 comments · Fixed by #47720
Closed

SQL: Extend DATE_TRUNC to also operate on intervals #46632

matriv opened this issue Sep 11, 2019 · 13 comments · Fixed by #47720
Labels

Comments

@matriv
Copy link
Contributor

matriv commented Sep 11, 2019

According to the PostgreSQL spec the DATE_TRUNC's 2nd argument can also be an interval: https://www.postgresql.org/docs/9.1/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC
Currently for ES-SQL it only supports DATETIME & DATE.

Follow up to: #46319

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@matriv matriv added the good first issue low hanging fruit label Sep 11, 2019
@musteaf
Copy link

musteaf commented Sep 14, 2019

Hi, I would like to work on this issue. Can I take it?

@rajalohiy8
Copy link

can I take this issue and work on this?

@musteaf
Copy link

musteaf commented Sep 16, 2019

Hi @matriv I am fully ready to work on this issue. I am just waiting for your response to prevent conflicts. Can I take it?

@matriv
Copy link
Contributor Author

matriv commented Sep 19, 2019

@musteaf Sorry for the delayed response. Please go ahead.
Thank you!

@musteaf
Copy link

musteaf commented Sep 19, 2019

@matriv No problem. I will start right away. Thank you.

@shoaib4330
Copy link

@musteaf Could I pick it up if you're not actively working on it?

@DANIELK121
Copy link

Hi, is this issue still open?
If so, I would like some help to run the function DATE_TRUNC -
I have forked and downloaded the project to my machine, and as written in the README file i ran
the @./gradlew assemble@ command in the cloned directory (via cmd line in windows).
I get the message:

FAILURE: Build failed with an exception.
and

* What went wrong:
A problem occurred evaluating project ':buildSrc'.
> At least Java 11 is required to build elasticsearch gradle tools

i have JDK 13 installed.
what can be the problem?

@musteaf
Copy link

musteaf commented Oct 7, 2019

Hi @shoaib4330 I'm about to finish. Only tests left.

@musteaf
Copy link

musteaf commented Oct 8, 2019

@matriv Sorry for being late. I sent a PR. #47720

@matriv
Copy link
Contributor Author

matriv commented Oct 8, 2019

@musteaf no worries at all, please, thank you for working on this.

@matriv
Copy link
Contributor Author

matriv commented Oct 8, 2019

Hi, is this issue still open?
If so, I would like some help to run the function DATE_TRUNC -
I have forked and downloaded the project to my machine, and as written in the README file i ran
the @./gradlew assemble@ command in the cloned directory (via cmd line in windows).
I get the message:

FAILURE: Build failed with an exception.
and

* What went wrong:
A problem occurred evaluating project ':buildSrc'.
> At least Java 11 is required to build elasticsearch gradle tools

i have JDK 13 installed.
what can be the problem?

@DANIELK121 Since @musteaf has already picked this up, please try to find another issue you would like to contribute to.

Regarding the problems you're having when trying to build es have you followed the guide here: https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md#contributing-to-the-elasticsearch-codebase ?

matriv pushed a commit that referenced this issue Mar 23, 2020
matriv added a commit that referenced this issue Mar 23, 2020
#47720) (#53972)

The function is extended to operate on intervals according to the PostgreSQL: https://www.postgresql.org/docs/9.1/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC

Closes : #46632
(cherry picked from commit 2dc7950)

Co-authored-by: musteaf <[email protected]>
@matriv
Copy link
Contributor Author

matriv commented Mar 23, 2020

master : 2dc7950
7.x : af03200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants