minor refactor
Add bql parser and thrift refactor