[jira] [Commented] (SPARK-17109) When we serialize UserDefinedGenerator to json, scala reflection throws an error
[ https://issues.apache.org/jira/browse/SPARK-17109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16196192#comment-16196192 ] Hyukjin Kwon commented on SPARK-17109: -- Hi all, looks we dropped 2.10 now - SPARK-19810. Would this JIRA be resolvable? > When we serialize UserDefinedGenerator to json, scala reflection throws an > error > > > Key: SPARK-17109 > URL: https://issues.apache.org/jira/browse/SPARK-17109 > Project: Spark > Issue Type: Bug > Components: SQL >Reporter: Wenchen Fan > > {code} > [info] - simple explode *** FAILED *** (19 milliseconds) > [info] Failed to parse logical plan to JSON: > [info] Project [word#128] > [info] +- Generate UserDefinedGenerator(words#126), true, false, None, > [word#128] > [info] +- Project [_1#125 AS words#126] > [info] +- LocalRelation [_1#125], [[a b c],[d e]] > (QueryTest.scala:214) > [info] org.scalatest.exceptions.TestFailedException: > [info] at > org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:496) > [info] at > org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1555) > [info] at org.scalatest.Assertions$class.fail(Assertions.scala:1348) > [info] at org.scalatest.FunSuite.fail(FunSuite.scala:1555) > [info] at > org.apache.spark.sql.QueryTest.checkJsonFormat(QueryTest.scala:214) > [info] at org.apache.spark.sql.QueryTest.checkAnswer(QueryTest.scala:137) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply$mcV$sp(DataFrameSuite.scala:122) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) > [info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) > [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) > [info] at org.scalatest.Transformer.apply(Transformer.scala:22) > [info] at org.scalatest.Transformer.apply(Transformer.scala:20) > [info] at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166) > [info] at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:42) > [info] at > org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) > [info] at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175) > [info] at org.scalatest.FunSuite.runTest(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) > [info] at scala.collection.immutable.List.foreach(List.scala:318) > [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) > [info] at > org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) > [info] at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) > [info] at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208) > [info] at org.scalatest.FunSuite.runTests(FunSuite.scala:1555) > [info] at org.scalatest.Suite$class.run(Suite.scala:1424) > [info] at > org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at org.scalatest.SuperEngine.runImpl(Engine.scala:545) > [info] at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212) > [info] at > org.apache.spark.sql.DataFrameSuite.org$scalatest$BeforeAndAfterAll$$super$run(DataFrameSuite.scala:36) > [info] at > org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257) > [info] at > org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256) > [info] at org.apache.spark.sql.DataFrameSuite.run(DataFrameSuite.scala:36) > [info] at > org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:462) > [info] at > org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:671) > [info] at sbt.ForkMain$Run$2.call(ForkMain.java:294) > [info] at sbt.ForkMain$Run$2.call(ForkMain.java:284) > [info]
[jira] [Commented] (SPARK-17109) When we serialize UserDefinedGenerator to json, scala reflection throws an error
[ https://issues.apache.org/jira/browse/SPARK-17109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15425082#comment-15425082 ] Iulian Dragos commented on SPARK-17109: --- So the problem is somewhere along the caller list :) There might be a workaround for 2.10 if you find the exact method that has different results. > When we serialize UserDefinedGenerator to json, scala reflection throws an > error > > > Key: SPARK-17109 > URL: https://issues.apache.org/jira/browse/SPARK-17109 > Project: Spark > Issue Type: Bug > Components: SQL >Reporter: Wenchen Fan > > {code} > [info] - simple explode *** FAILED *** (19 milliseconds) > [info] Failed to parse logical plan to JSON: > [info] Project [word#128] > [info] +- Generate UserDefinedGenerator(words#126), true, false, None, > [word#128] > [info] +- Project [_1#125 AS words#126] > [info] +- LocalRelation [_1#125], [[a b c],[d e]] > (QueryTest.scala:214) > [info] org.scalatest.exceptions.TestFailedException: > [info] at > org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:496) > [info] at > org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1555) > [info] at org.scalatest.Assertions$class.fail(Assertions.scala:1348) > [info] at org.scalatest.FunSuite.fail(FunSuite.scala:1555) > [info] at > org.apache.spark.sql.QueryTest.checkJsonFormat(QueryTest.scala:214) > [info] at org.apache.spark.sql.QueryTest.checkAnswer(QueryTest.scala:137) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply$mcV$sp(DataFrameSuite.scala:122) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) > [info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) > [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) > [info] at org.scalatest.Transformer.apply(Transformer.scala:22) > [info] at org.scalatest.Transformer.apply(Transformer.scala:20) > [info] at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166) > [info] at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:42) > [info] at > org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) > [info] at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175) > [info] at org.scalatest.FunSuite.runTest(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) > [info] at scala.collection.immutable.List.foreach(List.scala:318) > [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) > [info] at > org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) > [info] at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) > [info] at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208) > [info] at org.scalatest.FunSuite.runTests(FunSuite.scala:1555) > [info] at org.scalatest.Suite$class.run(Suite.scala:1424) > [info] at > org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at org.scalatest.SuperEngine.runImpl(Engine.scala:545) > [info] at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212) > [info] at > org.apache.spark.sql.DataFrameSuite.org$scalatest$BeforeAndAfterAll$$super$run(DataFrameSuite.scala:36) > [info] at > org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257) > [info] at > org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256) > [info] at org.apache.spark.sql.DataFrameSuite.run(DataFrameSuite.scala:36) > [info] at > org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:462) > [info] at > org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:671) > [info] at
[jira] [Commented] (SPARK-17109) When we serialize UserDefinedGenerator to json, scala reflection throws an error
[ https://issues.apache.org/jira/browse/SPARK-17109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15425073#comment-15425073 ] Yin Huai commented on SPARK-17109: -- For Scala 2.10, {{tpe}} is {{Tuple3}}. For Scala 2.11, it is {{(T1, T2, T3)}}. Oh, seems Scala 2.10 somehow drops the type arguments. btw, I am using scala 2.10.4 and scala 2.11.4. > When we serialize UserDefinedGenerator to json, scala reflection throws an > error > > > Key: SPARK-17109 > URL: https://issues.apache.org/jira/browse/SPARK-17109 > Project: Spark > Issue Type: Bug > Components: SQL >Reporter: Wenchen Fan > > {code} > [info] - simple explode *** FAILED *** (19 milliseconds) > [info] Failed to parse logical plan to JSON: > [info] Project [word#128] > [info] +- Generate UserDefinedGenerator(words#126), true, false, None, > [word#128] > [info] +- Project [_1#125 AS words#126] > [info] +- LocalRelation [_1#125], [[a b c],[d e]] > (QueryTest.scala:214) > [info] org.scalatest.exceptions.TestFailedException: > [info] at > org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:496) > [info] at > org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1555) > [info] at org.scalatest.Assertions$class.fail(Assertions.scala:1348) > [info] at org.scalatest.FunSuite.fail(FunSuite.scala:1555) > [info] at > org.apache.spark.sql.QueryTest.checkJsonFormat(QueryTest.scala:214) > [info] at org.apache.spark.sql.QueryTest.checkAnswer(QueryTest.scala:137) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply$mcV$sp(DataFrameSuite.scala:122) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) > [info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) > [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) > [info] at org.scalatest.Transformer.apply(Transformer.scala:22) > [info] at org.scalatest.Transformer.apply(Transformer.scala:20) > [info] at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166) > [info] at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:42) > [info] at > org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) > [info] at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175) > [info] at org.scalatest.FunSuite.runTest(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) > [info] at scala.collection.immutable.List.foreach(List.scala:318) > [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) > [info] at > org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) > [info] at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) > [info] at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208) > [info] at org.scalatest.FunSuite.runTests(FunSuite.scala:1555) > [info] at org.scalatest.Suite$class.run(Suite.scala:1424) > [info] at > org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at org.scalatest.SuperEngine.runImpl(Engine.scala:545) > [info] at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212) > [info] at > org.apache.spark.sql.DataFrameSuite.org$scalatest$BeforeAndAfterAll$$super$run(DataFrameSuite.scala:36) > [info] at > org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257) > [info] at > org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256) > [info] at org.apache.spark.sql.DataFrameSuite.run(DataFrameSuite.scala:36) > [info] at > org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:462) > [info] at > org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:671) > [info] at
[jira] [Commented] (SPARK-17109) When we serialize UserDefinedGenerator to json, scala reflection throws an error
[ https://issues.apache.org/jira/browse/SPARK-17109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15424979#comment-15424979 ] Iulian Dragos commented on SPARK-17109: --- No, it seems strange. I suggest you print out the `tpe` when it arrives in this method and see if it's the same in 2.10 and 2.11. The error may happen earlier, but it blows up here. > When we serialize UserDefinedGenerator to json, scala reflection throws an > error > > > Key: SPARK-17109 > URL: https://issues.apache.org/jira/browse/SPARK-17109 > Project: Spark > Issue Type: Bug > Components: SQL >Reporter: Wenchen Fan > > {code} > [info] - simple explode *** FAILED *** (19 milliseconds) > [info] Failed to parse logical plan to JSON: > [info] Project [word#128] > [info] +- Generate UserDefinedGenerator(words#126), true, false, None, > [word#128] > [info] +- Project [_1#125 AS words#126] > [info] +- LocalRelation [_1#125], [[a b c],[d e]] > (QueryTest.scala:214) > [info] org.scalatest.exceptions.TestFailedException: > [info] at > org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:496) > [info] at > org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1555) > [info] at org.scalatest.Assertions$class.fail(Assertions.scala:1348) > [info] at org.scalatest.FunSuite.fail(FunSuite.scala:1555) > [info] at > org.apache.spark.sql.QueryTest.checkJsonFormat(QueryTest.scala:214) > [info] at org.apache.spark.sql.QueryTest.checkAnswer(QueryTest.scala:137) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply$mcV$sp(DataFrameSuite.scala:122) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) > [info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) > [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) > [info] at org.scalatest.Transformer.apply(Transformer.scala:22) > [info] at org.scalatest.Transformer.apply(Transformer.scala:20) > [info] at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166) > [info] at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:42) > [info] at > org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) > [info] at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175) > [info] at org.scalatest.FunSuite.runTest(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) > [info] at scala.collection.immutable.List.foreach(List.scala:318) > [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) > [info] at > org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) > [info] at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) > [info] at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208) > [info] at org.scalatest.FunSuite.runTests(FunSuite.scala:1555) > [info] at org.scalatest.Suite$class.run(Suite.scala:1424) > [info] at > org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at org.scalatest.SuperEngine.runImpl(Engine.scala:545) > [info] at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212) > [info] at > org.apache.spark.sql.DataFrameSuite.org$scalatest$BeforeAndAfterAll$$super$run(DataFrameSuite.scala:36) > [info] at > org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257) > [info] at > org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256) > [info] at org.apache.spark.sql.DataFrameSuite.run(DataFrameSuite.scala:36) > [info] at > org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:462) > [info] at > org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:671) > [info] at
[jira] [Commented] (SPARK-17109) When we serialize UserDefinedGenerator to json, scala reflection throws an error
[ https://issues.apache.org/jira/browse/SPARK-17109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15424907#comment-15424907 ] Yin Huai commented on SPARK-17109: -- Yea, seems scala 2.11 is fine (I also tested this test in the branch 1.6 with scala 2.11). In ScalaReflection.scala, the following code has different behaviors when running in scala 2.11 {code} def getConstructorParameters(tpe: Type): Seq[(String, Type)] = { val formalTypeArgs = tpe.typeSymbol.asClass.typeParams val TypeRef(_, _, actualTypeArgs) = tpe {code} In scala 2.11, when {{tpe}} is {{(T1, T2, T3)}}, formalTypeArgs is {{List(type T1, type T2, type T3)}} and actualTypeArgs is {{List(T1, T2, T3)}}. However, in scala 2.10, formalTypeArgs is still {{List(type T1, type T2, type T3)}}, but actualTypeArgs is {{List()}}. [~dragos] Do you know any known issue with Scala 2.10 that may cause {{TypeRef.unapply}} returns an empty list for type args when the type is a {{Tuple3}} (or any Tuple)? > When we serialize UserDefinedGenerator to json, scala reflection throws an > error > > > Key: SPARK-17109 > URL: https://issues.apache.org/jira/browse/SPARK-17109 > Project: Spark > Issue Type: Bug > Components: SQL >Reporter: Wenchen Fan > > {code} > [info] - simple explode *** FAILED *** (19 milliseconds) > [info] Failed to parse logical plan to JSON: > [info] Project [word#128] > [info] +- Generate UserDefinedGenerator(words#126), true, false, None, > [word#128] > [info] +- Project [_1#125 AS words#126] > [info] +- LocalRelation [_1#125], [[a b c],[d e]] > (QueryTest.scala:214) > [info] org.scalatest.exceptions.TestFailedException: > [info] at > org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:496) > [info] at > org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1555) > [info] at org.scalatest.Assertions$class.fail(Assertions.scala:1348) > [info] at org.scalatest.FunSuite.fail(FunSuite.scala:1555) > [info] at > org.apache.spark.sql.QueryTest.checkJsonFormat(QueryTest.scala:214) > [info] at org.apache.spark.sql.QueryTest.checkAnswer(QueryTest.scala:137) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply$mcV$sp(DataFrameSuite.scala:122) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) > [info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) > [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) > [info] at org.scalatest.Transformer.apply(Transformer.scala:22) > [info] at org.scalatest.Transformer.apply(Transformer.scala:20) > [info] at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166) > [info] at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:42) > [info] at > org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) > [info] at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175) > [info] at org.scalatest.FunSuite.runTest(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) > [info] at scala.collection.immutable.List.foreach(List.scala:318) > [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) > [info] at > org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) > [info] at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) > [info] at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208) > [info] at org.scalatest.FunSuite.runTests(FunSuite.scala:1555) > [info] at org.scalatest.Suite$class.run(Suite.scala:1424) > [info] at > org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at org.scalatest.SuperEngine.runImpl(Engine.scala:545) > [info] at
[jira] [Commented] (SPARK-17109) When we serialize UserDefinedGenerator to json, scala reflection throws an error
[ https://issues.apache.org/jira/browse/SPARK-17109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15424842#comment-15424842 ] Yin Huai commented on SPARK-17109: -- The definition of {{UserDefinedGenerator}} is {code} case class UserDefinedGenerator( elementTypes: Seq[(DataType, Boolean, String)], function: Row => TraversableOnce[InternalRow], children: Seq[Expression]) {code} Seems `elementTypes` causes this problem. Seems scala 2.11 fixes this issue? > When we serialize UserDefinedGenerator to json, scala reflection throws an > error > > > Key: SPARK-17109 > URL: https://issues.apache.org/jira/browse/SPARK-17109 > Project: Spark > Issue Type: Bug > Components: SQL >Reporter: Wenchen Fan > > {code} > [info] - simple explode *** FAILED *** (19 milliseconds) > [info] Failed to parse logical plan to JSON: > [info] Project [word#128] > [info] +- Generate UserDefinedGenerator(words#126), true, false, None, > [word#128] > [info] +- Project [_1#125 AS words#126] > [info] +- LocalRelation [_1#125], [[a b c],[d e]] > (QueryTest.scala:214) > [info] org.scalatest.exceptions.TestFailedException: > [info] at > org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:496) > [info] at > org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1555) > [info] at org.scalatest.Assertions$class.fail(Assertions.scala:1348) > [info] at org.scalatest.FunSuite.fail(FunSuite.scala:1555) > [info] at > org.apache.spark.sql.QueryTest.checkJsonFormat(QueryTest.scala:214) > [info] at org.apache.spark.sql.QueryTest.checkAnswer(QueryTest.scala:137) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply$mcV$sp(DataFrameSuite.scala:122) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.apache.spark.sql.DataFrameSuite$$anonfun$10.apply(DataFrameSuite.scala:119) > [info] at > org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) > [info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) > [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) > [info] at org.scalatest.Transformer.apply(Transformer.scala:22) > [info] at org.scalatest.Transformer.apply(Transformer.scala:20) > [info] at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166) > [info] at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:42) > [info] at > org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175) > [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) > [info] at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175) > [info] at org.scalatest.FunSuite.runTest(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) > [info] at > org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) > [info] at scala.collection.immutable.List.foreach(List.scala:318) > [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) > [info] at > org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) > [info] at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) > [info] at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208) > [info] at org.scalatest.FunSuite.runTests(FunSuite.scala:1555) > [info] at org.scalatest.Suite$class.run(Suite.scala:1424) > [info] at > org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at > org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212) > [info] at org.scalatest.SuperEngine.runImpl(Engine.scala:545) > [info] at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212) > [info] at > org.apache.spark.sql.DataFrameSuite.org$scalatest$BeforeAndAfterAll$$super$run(DataFrameSuite.scala:36) > [info] at > org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257) > [info] at > org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256) > [info] at org.apache.spark.sql.DataFrameSuite.run(DataFrameSuite.scala:36) > [info] at >