This question can be logically answered based on a few conditions.
Has liquid been poured into the container and not been consumed or otherwise removed from the container? If yes, then the glass is half full, based on the condition being that the last action performed on the liquid within the glass was the action of filling the glass with said liquid.
Had liquid been consumed or otherwise removed from the container while it contained more than 50% of its total intended capacity of liquid? If so, the glass is half empty, based on the condition that the last action performed on the liquid in the glass was bringing the total liquid level based on the capacity of the glass from above 50% to exactly half.
Now, we can forever answer this question and forget the philosophies of optimism versus pessimism in the equation, for they do not logically factor in an argument about liquids and containers.
Then this is a phenomenon known as "Schrodinger's glass" where the glass is both half empty and half full at the same time, due to the inability to determine the previous state of said glass.