apache/spark — pull request #1148 by aarondav (2014-06-20 06:06:48+00:00)
Title: [SQL] Use hive.SessionState, not the thread local SessionState

Note that this is simply mimicing lookupRelation(). I do not have a conrete notion of why this solution is necessarily right-er than SessionState.get, but SessionState.get is returning null, which is bad.