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

Bug: date_part function giving incorrect results #4667

Open
gaurav8297 opened this issue Dec 27, 2024 · 0 comments
Open

Bug: date_part function giving incorrect results #4667

gaurav8297 opened this issue Dec 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@gaurav8297
Copy link
Collaborator

Kùzu version

latest

What operating system are you using?

No response

What happened?

kuzu> MATCH (p:persons) WHERE date_part('year', p.birth_date) >= 1915 AND date_part('year', p.birth_date) < 1970 RETURN count(p);
┌──────────────┐
│ COUNT(p._ID) │
│ INT64        │
├──────────────┤
│ 0            │
└──────────────┘
(1 tuple)
(1 column)
Time: 0.20ms (compiling), 16.66ms (executing)
kuzu> MATCH (p:persons) RETURN date_part('year', p.birth_date) LIMIT 10;
┌──────────────────────────────┐
│ DATE_PART(year,p.birth_date) │
│ INT64                        │
├──────────────────────────────┤
│ 1903                         │
│ 1931                         │
│ 1927                         │
│ 1975                         │
│ 1927                         │
│ 1981                         │
│ 1946                         │
│ 1942                         │
│ 1973                         │
│ 1950                         │
└──────────────────────────────┘
(10 tuples)
(1 column)
Time: 0.13ms (compiling), 0.55ms (executing)

In the first query, filter returns 0 as count whereas as you see in the second query there are years which are less than 1970 and greater than 1915.

Are there known steps to reproduce?

No response

@gaurav8297 gaurav8297 added the bug Something isn't working label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant