3 ms·
Single line solve using clickhouse-local or duckdb.
by gigatexal 3y ago
Single line solve using clickhouse-local or duckdb.
- lars_francke 3y ago> No external dependencies may be used
- gigatexal 3y agothe whole premise is silly though. why would anyone use plain java to compute this when databases were built for this or at least are the most finely tuned for it
- gunnarmorling 3y agoIt's only silly if you miss the point of the challenge :) Which is to learn something new and have fun along the way.
- gigatexal 3y agoBut is it realistic at all? Also will I get pilloried if I just make it a big StreamOf thing? ;-)
- tatersolid 3y agoThe Java runtime is an external dependency, isn’t it?
- uwemaurer 3y agocorrect. like this: time duckdb -list -c "select map_from_entries(list((name,x))) as result from (select name, printf('%.1f/%.1f/%.1f',min(value), mean(value),max(value)) as x from read_csv('measurements.txt', delim=';', columns={'name': 'varchar', 'value':'float'}) group by name order by name)" takes about 20 seconds