spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kunalkhamar <...@git.apache.org>
Subject [GitHub] spark issue #17486: [SPARK-20164][SQL] AnalysisException not tolerant of nul...
Date Fri, 31 Mar 2017 22:48:46 GMT
Github user kunalkhamar commented on the issue:

    https://github.com/apache/spark/pull/17486
  
    @gatorsmile Verified the behaviour using this, it makes `plan` null upon deserialization.
    ```
    import java.io._
    import org.apache.spark.sql.AnalysisException
    
    lazy val exception = new AnalysisException("", None, None, plan = None)
    // Serialize exception
    lazy val bo = new ByteArrayOutputStream()
    lazy val o = new ObjectOutputStream(bo)
    o.writeObject(exception)
    lazy val bytes = bo.toByteArray
    
    // Deserialize ex
    lazy val bi = new ByteArrayInputStream(bytes)
    lazy val i = new ObjectInputStream(bi)
    lazy val deserialized = i.readObject.asInstanceOf[AnalysisException]
    
    println(deserialized.plan)
    ```
    
    Not sure what to add and where in the scala-style-guide?


---
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


Mime
View raw message