When casting the wall spell, it usually has the dimensions for it. 10'x10'x1' etc. For casting into a room at the end of the hall, if the floor is visible through the open doorway, then the wall will form at the point, 5' to either side of the visible point. If it's something solid like stone or earth, and the height is too high, it could burst through the ceiling. If it's softer material like water, fire, air, it would most likely only go as high as the ceiling (with fire possibly burning through if the spell is able to burn long enough).
If I recall, the description of the wall spell is "the equivalent of a 10'x10'x1' wall of..." If the room is only 8' high, then the actual wall would be like 11'wide x 8'high x 1' thick. If cast in a hallway, it would fill wall to wall, floor to ceiling, but be thicker than 1' as excess material fills in.
We wouldn't require the caster to be able to see the entire 10' wide span of the floor.