Skip to content

Commit b1d404e

Browse files
committed
Address review comments
1 parent 1878c70 commit b1d404e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/pyspark/sql/context.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# limitations under the License.
1616
#
1717

18+
from __future__ import print_function
1819
import sys
1920
import warnings
2021
import json
@@ -686,10 +687,10 @@ def _ssql_ctx(self):
686687
self._scala_HiveContext = self._get_hive_ctx()
687688
return self._scala_HiveContext
688689
except Py4JError as e:
689-
warnings.warn("You must build Spark with Hive. "
690+
print("You must build Spark with Hive. "
690691
"Export 'SPARK_HIVE=true' and run "
691-
"build/sbt assembly")
692-
raise e
692+
"build/sbt assembly", file=sys.stderr)
693+
raise
693694

694695
def _get_hive_ctx(self):
695696
return self._jvm.HiveContext(self._jsc.sc())

0 commit comments

Comments
 (0)