[server][HostResourceQueryOption] Fix a bug that doesn't join the host table even when the hostgroups enumeration is in the condition.

Now 3 errors have happened by the patch due to the inappropriate
of the expected value. I will fix them in later commits.