Enhance translate api to return proper query
It's good that the new translate api is handling the empty compiled result {"result":{}}. We need to return the proper subquery syntax instead of the empty compiled result.
I just tested and there are two different cases that can result the empty compiled result:
(1) The policy id does not exits (2) If the policy allow rule is evaluated false no matter the input data is, the compiled result is empty.
For case (1), we may need to throw exception.
For case (2), seems it's good that the translate api needs to return a subquery which is always false.
Edited by Dadong Zhou