query built modulo thrift