-
Notifications
You must be signed in to change notification settings - Fork 84
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
MAX() function always returns 0 #148
Comments
Well, i found the issues. The MAX function only works if it can cast the value to usize, otherwise it ignores the value, so that explains why The issue with I tried fixing it myself, but i can't really understand the structure of the code, especially since it doesn't have many comments. |
Thank you very much for this issue! Indeed, the code is an undocumented mess... It appears, a deliberate "shortcut" has been made at some point, so the aggregates didn't work with the enclosed functions. I added a small fix to the master branch. It would be great to check if it works for you now. MIN and MAX for datetime fields is actually an another problem. Will add it soon, I guess :) |
Works fine now! |
Absolutely! That would be great, thank you.
…On Sat, May 11, 2024, 11:22 Matthieu LAURENT ***@***.***> wrote:
Works fine now!
About the lack of code comments, would you accept a PR that reformats /
documents some of the code?
—
Reply to this email directly, view it on GitHub
<#148 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOACPASJSBCR7LFOXY5AVTZBXPOFAVCNFSM6AAAAABHQ6U7AWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGY2TANZTHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
On 0.8.5, as well as on master (9d165b2), the MAX() function seems to always return 0 for anything related to dates.
Here are some queries i tried that have this issue:
fselect "MAX(modified) from /tmp/test"
fselect "MAX(YEAR(modified)) from /tmp/test"
However, this works:
fselect "MAX(size) from /tmp/test"
Also note that
fselect "YEAR(modified) from /tmp/test"
fselect "modified from /tmp/test"
work just fine
i'm currently trying to find the issue, i'll open a PR if i do find it
The text was updated successfully, but these errors were encountered: