-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-11636] [SQL] Support classes defined in the REPL with Encoders #9602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test build #45543 has finished for PR 9602 at commit
|
|
Does a REPL defined class blow up with a |
|
Interesting, I don't think thats it though. We are lacking the outer pointer when we try to construct it inside of the encoder. |
a0a04a7 to
fe657af
Compare
|
Test build #46068 has finished for PR 9602 at commit
|
|
Test build #46072 has finished for PR 9602 at commit
|
ef65e9e to
b52ef46
Compare
b52ef46 to
35cd4f4
Compare
|
Test build #46150 has finished for PR 9602 at commit
|
|
Test build #46142 has finished for PR 9602 at commit
|
|
Test build #46152 has finished for PR 9602 at commit
|
|
Test build #46167 has finished for PR 9602 at commit
|
|
Test this please |
Conflicts: sql/core/src/main/scala/org/apache/spark/sql/GroupedDataset.scala
2049053 to
fa96708
Compare
|
Test build #46258 has finished for PR 9602 at commit
|
|
Test build #2089 has finished for PR 9602 at commit
|
Before this PR there were two things that would blow up if you called `df.as[MyClass]` if `MyClass` was defined in the REPL: - [x] Because `classForName` doesn't work on the munged names returned by `tpe.erasure.typeSymbol.asClass.fullName` - [x] Because we don't have anything to pass into the constructor for the `$outer` pointer. Note that this PR is just adding the infrastructure for working with inner classes in encoder and is not yet sufficient to make them work in the REPL. Currently, the implementation show in marmbrus@95cec7d is causing a bug that breaks code gen due to some interaction between janino and the `ExecutorClassLoader`. This will be addressed in a follow-up PR. Author: Michael Armbrust <[email protected]> Closes #9602 from marmbrus/dataset-replClasses. (cherry picked from commit 59a5013) Signed-off-by: Michael Armbrust <[email protected]>
Before this PR there were two things that would blow up if you called
df.as[MyClass]ifMyClasswas defined in the REPL:classForNamedoesn't work on the munged names returned bytpe.erasure.typeSymbol.asClass.fullName$outerpointer.Note that this PR is just adding the infrastructure for working with inner classes in encoder and is not yet sufficient to make them work in the REPL. Currently, the implementation show in marmbrus@95cec7d is causing a bug that breaks code gen due to some interaction between janino and the
ExecutorClassLoader. This will be addressed in a follow-up PR.