Merge pull request #255 from boneill42/master

Fix for shark environment template when JAVA_OPTS is set.
Fixed the bug that all columns for cached tables get pruned in lateral view (and as a result returning nulls for everything).

(cherry picked from commit a696fe9e66922747bf7bee2cb342c33a0986da54)
Signed-off-by: Reynold Xin <rxin@apache.org>