Comments (4)
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 fselect "MAX(modified) from /tmp/test"
didn't work. I assume that's intended behavior.
The issue with fselect "MAX(YEAR(modified)) from /tmp/test"
(as well as fselect "MIN(YEAR(modified)) from /home/user"
, which is an example from the docs) is that it will look for Year(Modified)
in the hasmap from the raw_output_buffer, but that hasmap only contains the raw Modified
and an empty Min(Year(Modified))
.
That means a really simple workaround is to use this query: MIN(YEAR(modified)), YEAR(modified) from /tmp/test
., which will make fselect compute the needed Year(Modified)
.
I tried fixing it myself, but i can't really understand the structure of the code, especially since it doesn't have many comments.
from fselect.
from fselect.
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 :)
from fselect.
Works fine now!
About the lack of code comments, would you accept a PR that reformats / documents some of the code?
from fselect.
Related Issues (20)
- json output missing comma separator HOT 2
- permission denied when using fselect in folder with lost+found
- Suggestion for how to compare contents of two paths?
- following a question on StackOverFlow HOT 3
- created not working HOT 2
- SQLite backend in the future? HOT 3
- Automatically build debs with each release
- Print a message if a newer version is available
- thread 'main' panicked at 'Illegal datetime format' HOT 2
- [Build fail] mp4parse now will cause 'error[E0277]: cannot multiply `u64` by `NonZeroU8`' HOT 5
- `depth` is not recognized when I don't mention any path HOT 1
- Support rust 1.70.0 HOT 4
- Donation for fselect HOT 1
- Need lib.rs to include fselect as a library in another Rust binary HOT 1
- support between operator HOT 1
- Duration for MP3 is in seconds, but for mp4 in it is in milliseconds HOT 1
- Please rename the release name to standard form. HOT 1
- Alternative to SQL: SPL
- Not working when PATH have spaces! HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fselect.