You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by JoshRosen <gi...@git.apache.org> on 2016/01/13 21:34:22 UTC

[GitHub] spark pull request: [SPARK-12120][PYSPARK] Improve exception messa...

Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10126#discussion_r49646481
  
    --- Diff: python/pyspark/sql/context.py ---
    @@ -686,9 +686,10 @@ def _ssql_ctx(self):
                     self._scala_HiveContext = self._get_hive_ctx()
                 return self._scala_HiveContext
             except Py4JError as e:
    -            raise Exception("You must build Spark with Hive. "
    -                            "Export 'SPARK_HIVE=true' and run "
    -                            "build/sbt assembly", e)
    +            warnings.warn("You must build Spark with Hive. "
    --- End diff --
    
    Python warnings can be disabled, so I'm worried that a lot of users might not end up seeing this message in that case. Also, this is more of an error message than a warning. Therefore, I think we should change this to a `print` statement (if we had a good logging story in PySpark, I'd say to log it as an error instead).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org