Fixed a bug that some columns become null for in-memory tables when lateral view explode is used.

Column pruning code was too aggressive in pruning out the columns that were actually selected.