add thrift query and test