spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BryanCutler <...@git.apache.org>
Subject [GitHub] spark issue #20839: [SPARK-23699][PYTHON][SQL] Raise same type of error caug...
Date Wed, 21 Mar 2018 23:46:11 GMT
Github user BryanCutler commented on the issue:

    https://github.com/apache/spark/pull/20839
  
    @HyukjinKwon and @ueshin I came close to a solution that would wrap the exception message
like before but still keep the exception type and traceback.  The problem was there are too
many variations in python exceptions and it was getting too complicated to be foolproof. 
For instance, `ImportError` does not use `args` for the message, but has another attribute
`message` in Python 2 and `msg` in Python 3.
    
    To keep things simple for this, I thought it would be fine when fallback is disabled,
to still print a warning message to indicate the related conf, and then use `raise` to re-raise
the exception which retains the original exception with traceback.  I manually ran tests of
toPandas and createDataFrame with Python 2 & 3 and it looks cleaner imo.  What do you
guys think?


---

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


Mime
View raw message