티스토리 뷰

}, Encoders.bean(xxxx.class));

// xxxx class has enum class.
// and don't use enum fields
// add new String field

https://github.com/apache/spark/pull/17013

 

[SPARK-19666][SQL] Skip a property without getter in Java schema inference and allow empty bean in encoder creation by HyukjinKw

What changes were proposed in this pull request? This PR proposes to fix two. Skip a property without a getter in beans Currently, if we use a JavaBean without the getter as below: public static cl...

github.com

https://issues.apache.org/jira/browse/SPARK-21473

 

[SPARK-21473] Running Transform on a bean which has only setters gives NullPointerExcpetion - ASF JIRA

If I run the following using the Java API dataset.map(Transformer::transform, Encoders.bean(BeanWithOnlySettersAndNoGetters.class)); Then I get the below exception. I understand that it is not bean-compliant without the getters but the exception is wrong.

issues.apache.org

https://stackoverflow.com/questions/15521309/is-custom-enum-serializable-too/15522276#15522276

 

Is custom enum Serializable too?

I understand Enum is Serializable. Hence, it is safe to do so. (selectedCountry is enum Country) Original enum without customer member variables public enum Country { Australia, Austria, ...

stackoverflow.com

 

댓글
댓글쓰기 폼