-
- Downloads
[SPARK-19751][SQL] Throw an exception if bean class has one's own class in fields
## What changes were proposed in this pull request? The current master throws `StackOverflowError` in `createDataFrame`/`createDataset` if bean has one's own class in fields; ``` public class SelfClassInFieldBean implements Serializable { private SelfClassInFieldBean child; ... } ``` This pr added code to throw `UnsupportedOperationException` in that case as soon as possible. ## How was this patch tested? Added tests in `JavaDataFrameSuite` and `JavaDatasetSuite`. Author: Takeshi Yamamuro <yamamuro@apache.org> Closes #17188 from maropu/SPARK-19751.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala 13 additions, 6 deletions...ala/org/apache/spark/sql/catalyst/JavaTypeInference.scala
- sql/core/src/test/java/test/org/apache/spark/sql/JavaDataFrameSuite.java 32 additions, 0 deletions...st/java/test/org/apache/spark/sql/JavaDataFrameSuite.java
- sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java 87 additions, 0 deletions...test/java/test/org/apache/spark/sql/JavaDatasetSuite.java
Please register or sign in to comment