GitHub user ppadma opened a pull request: https://github.com/apache/drill/pull/1015
DRILL-5889: Simple pattern matchers can work with DrillBuf directly For the 4 simple patterns we have i.e. startsWith, endsWith, contains and constant,, we do not need the overhead of charSequenceWrapper. We can work with DrillBuf directly. This will save us from doing isAscii check and UTF8 decoding for each row. UTF-8 encoding ensures that no UTF-8 character is a prefix of any other valid character. So, instead of decoding varChar from each row we are processing, encode the patternString once during setup and do raw byte comparison. This improved overall performance for filter operator by around 20%. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ppadma/drill DRILL-5899 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/1015.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1015 ---- commit ebe2c6f9110f0501a85cb5ae6e119e05254b9f3e Author: Padma Penumarthy <ppenuma...@yahoo.com> Date: 2017-10-25T20:37:25Z DRILL-5889: Simple pattern matchers can work with DrillBuf directly ---- ---