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: when GROUPed BY, the DAY_NAME function outputs incorrect results #40241

Closed
astefan opened this issue Mar 20, 2019 · 2 comments · Fixed by #46421
Closed

SQL: when GROUPed BY, the DAY_NAME function outputs incorrect results #40241

astefan opened this issue Mar 20, 2019 · 2 comments · Fixed by #46421
Assignees
Labels

Comments

@astefan
Copy link
Contributor

astefan commented Mar 20, 2019

sql> SELECT DAY_NAME(birth_date + INTERVAL 1 DAY) FROM test_emp GROUP BY DAY_NAME(birth_date + INTERVAL 1 DAY) LIMIT 5;
DAY_NAME(birth_date + INTERVAL 1 DAY)
-------------------------------------
null
1952-02-28T00:00Z
1952-04-20T00:00Z
1952-05-16T00:00Z
1952-06-14T00:00Z

And without being GROUPed BY:

sql> SELECT DAY_NAME(birth_date + INTERVAL 1 DAY) FROM test_emp LIMIT 5;
DAY_NAME(birth_date + INTERVAL 1 DAY)                                   
-------------------------------------                                   
Thursday                                                                
Wednesday                                                               
Friday                                                                  
Sunday                                                                  
Saturday                                                                
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@astefan
Copy link
Contributor Author

astefan commented Sep 9, 2019

master (8.0.0): cb92828
7.x (7.5.0): 7cf100b
7.4 (7.4.1): 41414e1
7.3 (7.3.3): 49d2107

@astefan astefan assigned astefan and unassigned costin Sep 9, 2019
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.

3 participants