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: Fix ORDER BY YEAR() function #51562

Merged
merged 7 commits into from
Jan 30, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adapt test
  • Loading branch information
matriv committed Jan 28, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 94251c9b43c0a21f829ff82d23abd55c5859aab1
2 changes: 1 addition & 1 deletion x-pack/plugin/sql/qa/src/main/resources/datetime.sql-spec
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ SELECT MAX(salary) AS max FROM test_emp GROUP BY NOW();
// ORDER BY
//
orderByYear
SELECT YEAR(birth_date) as year, emp_no FROM test_emp ORDER BY year DESC, emp_no ASC;
SELECT YEAR(birth_date) as year, emp_no FROM test_emp ORDER BY year NULLS FIRST, emp_no ASC;

// ES will consider a TIME in UTC, if no other indication is given and H2 doesn't consider the timezone for times, so no TZSync'ing needed.
hourFromStringTime