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

Wrong emulation of EXTRACT() with DECADE, CENTURY, MILLENIUM date parts #10248

Closed
lukaseder opened this issue Jun 4, 2020 · 2 comments
Closed

Comments

@lukaseder
Copy link
Member

In some dialects, EXTRACT() may yield non-integer results. For example:

-- Input
extract(millennium from date '2001-01-01')

-- Output in CockroachDB
(extract(year from date '2001-01-01') / 10)

When executed, this yields 200.1, not 200, due to the fact that that EXTRACT() produces a floating point number.

@lukaseder
Copy link
Member Author

A lot of features depend on EXTRACT(), which means a backport will bring with it some slight regression risk. I won't backport this fix.

@lukaseder lukaseder added this to Done in 3.14 Other improvements via automation Jun 4, 2020
@lukaseder
Copy link
Member Author

It is needed for #7900, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant