gortiz opened a new pull request, #12354: URL: https://github.com/apache/pinot/pull/12354
There are some questions about the performance on the implementation proposed in #12227. This PR modifies the code to add several Mode implementations that can be selected by using `mode(col, MIN, number)`, where number is a literal from 0 to 5 that selects the specific implementation. The code is not the best and the idea is not to merge this PR as it is but to use it to make it easier to benchmark different solutions. I would like to repeat the tests with longer executions. I may do that next week. Also notice that mode 1 does not support null handling Results in AMD Ryzen 9 3900X: ``` (_aQueryTemplate) (_impl) (_nullHandling) Mode Cnt Score Error Units select mode(value, 'MIN', %s) from benchmark 0 true thrpt 25 0.998 ± 0.111 ops/ms select mode(value, 'MIN', %s) from benchmark 2 true thrpt 25 0.921 ± 0.143 ops/ms select mode(value, 'MIN', %s) from benchmark 3 true thrpt 25 0.994 ± 0.137 ops/ms select mode(value, 'MIN', %s) from benchmark 4 true thrpt 25 1.026 ± 0.129 ops/ms select mode(value, 'MIN', %s) from benchmark 5 true thrpt 25 0.978 ± 0.135 ops/ms select mode(value, 'MIN', %s) from benchmark 1 false thrpt 25 0.974 ± 0.135 ops/ms select mode(value, 'MIN', %s) from benchmark 0 false thrpt 25 1.014 ± 0.139 ops/ms select mode(value, 'MIN', %s) from benchmark 2 false thrpt 25 0.909 ± 0.119 ops/ms select mode(value, 'MIN', %s) from benchmark 3 false thrpt 25 0.953 ± 0.111 ops/ms select mode(value, 'MIN', %s) from benchmark 4 false thrpt 25 0.975 ± 0.136 ops/ms select mode(value, 'MIN', %s) from benchmark 5 false thrpt 25 1.050 ± 0.120 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 0 true thrpt 25 1.921 ± 0.161 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 2 true thrpt 25 1.351 ± 0.160 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 3 true thrpt 25 1.456 ± 0.151 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 4 true thrpt 25 1.703 ± 0.179 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 5 true thrpt 25 1.742 ± 0.197 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 0 false thrpt 25 2.041 ± 0.154 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 1 false thrpt 25 2.023 ± 0.151 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 2 false thrpt 25 1.308 ± 0.138 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 3 false thrpt 25 1.715 ± 0.259 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 4 false thrpt 25 1.579 ± 0.173 ops/ms select mode(valueDict, 'MIN', %s) from benchmark 5 false thrpt 25 1.812 ± 0.176 ops/ms ``` cc @Jackie-Jiang -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org