Refactored query plan building
Merge branch 'master' of github.com:MakarovAlexey/cl-db