Uh oh!
There was an error while loading. Please reload this page.
[SPARK-18122][SQL][WIP]Fallback to Kryo for unsupported encoder for class's subfield - #15918
[SPARK-18122][SQL][WIP]Fallback to Kryo for unsupported encoder for class's subfield#15918windpiger wants to merge 8 commits into
Conversation
SparkQA
commented
Nov 17, 2016
Test build #68764 has finished for PR 15918 at commit
|
srowen
commented
Nov 17, 2016
I think this introduces a big behavior change, right? now objects are serialized with a hybrid of two serializers? I am not sure this is a good idea. |
windpiger
commented
Nov 17, 2016
Yes, and there is a aspect to be concerned: |
srowen
commented
Nov 25, 2016
There's not obviously a way to implement this, IMHO. I am not sure mixing two serializations would make sense. I would close these for now. |
rxin
commented
Nov 27, 2016
FWIW I think there are some value here, but I agree that changing the default behavior can be surprising and bad. |
koertkuipers
commented
Nov 27, 2016
@srowen and @rxin what is the default behavior that is changed here? i see a current situation where an implicit encoder is provided that simply cannot handle the task at hand and this leads to failure. either the implicits for ExpressionEncoder need to be more narrow so that they do not claim types they cannot handle (and then other implicit encoders can be used), or they need to be able to handle these types, for example by falling back to kryo as is suggested in this JIRA. currrently i proposed making the ExpressionEncoders more narrow (that seemed the easier fix to me at first) but @marmbrus preferred the approach of falling back to kryo and broadening it. see: |
I agree with @koertkuipers that the only change in behavior is that cases that used to throw an error will now not throw an error. If done right (I haven't looked deeply at the PR itself yet), no case that is currently working should change. It is maybe slightly odd to mix serialization types, but thats kind of already happening today if you use the The one possible concern compatibility concern I can see is, if in the future we add support for an previously unsupported type, the schema will change from Thoughts? |
marmbrus
commented
Dec 1, 2016
We should probably add a flag (maybe even off by default). The error message can tell you to turn on the flag if you are okay with the fallback. |
koertkuipers
commented
Dec 1, 2016
if we do a flag i would also prefer it if the current implicits are more narrow if the flag is not set, if possible. |
marmbrus
commented
Dec 2, 2016
I don't think you can limit the implicit. What type would pick up case classes, but not case classes that contain invalid things? I think you would need a macros for this kind of introspection. (I'd be happy to be proven wrong with a PR.) I'd recommend you only import the implicits you need rather than using the wildcard. |
koertkuipers
commented
Dec 3, 2016
via email
It can be done with shapeless (which perhaps uses macros under hood, I
don't know).
On Dec 1, 2016 19:56, "Michael Armbrust" <notifications@github.com> wrote:
I don't think you can limit the implicit. What type would pick up case
classes, but not case classes that contain invalid things? I think you
would need a macros for this kind of introspection. (I'd be happy to be
proven wrong with a PR.)
I'd recommend you only import the implicits you need rather than using the
wildcard.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15918 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAyIJLwL-MWdzQGb6Ioe2fr_GgP0rP05ks5rD2zNgaJpZM4K1D7U>
. |
marmbrus
commented
Feb 14, 2017
@windpiger, were you still working on this? I think it would be a useful feature if we can get the tests to pass. |
windpiger
commented
Feb 14, 2017
oh sorry,Recently I was working on other works, I will continue to work on the this soon,and finish it. |
windpiger
commented
Feb 14, 2017
retest this please |
SparkQA
commented
Feb 14, 2017
Test build #72873 has finished for PR 15918 at commit
|
SparkQA
commented
Feb 15, 2017
Test build #72922 has started for PR 15918 at commit |
SparkQA
commented
Feb 15, 2017
Test build #72921 has finished for PR 15918 at commit
|
SparkQA
commented
Feb 15, 2017
Test build #72924 has started for PR 15918 at commit |
windpiger
commented
Feb 15, 2017
retest this please |
SparkQA
commented
Feb 15, 2017
Test build #72927 has finished for PR 15918 at commit
|
SparkQA
commented
Feb 15, 2017
Test build #72936 has finished for PR 15918 at commit
|
JasonMWhite
commented
Mar 12, 2017
@windpiger I see you flipped it back to |
windpiger
commented
Mar 13, 2017
this change of even if I use |
HyukjinKwon
commented
May 11, 2017
Hi @windpiger, is this still WIP? |
## What changes were proposed in this pull request? This PR proposes to close PRs ... - inactive to the review comments more than a month - WIP and inactive more than a month - with Jenkins build failure but inactive more than a month - suggested to be closed and no comment against that - obviously looking inappropriate (e.g., Branch 0.5) To make sure, I left a comment for each PR about a week ago and I could not have a response back from the author in these PRs below: Closesapache#11129Closesapache#12085Closesapache#12162Closesapache#12419Closesapache#12420Closesapache#12491Closesapache#13762Closesapache#13837Closesapache#13851Closesapache#13881Closesapache#13891Closesapache#13959Closesapache#14091Closesapache#14481Closesapache#14547Closesapache#14557Closesapache#14686Closesapache#15594Closesapache#15652Closesapache#15850Closesapache#15914Closesapache#15918Closesapache#16285Closesapache#16389Closesapache#16652Closesapache#16743Closesapache#16893Closesapache#16975Closesapache#17001Closesapache#17088Closesapache#17119Closesapache#17272Closesapache#17971 Added: Closesapache#17778Closesapache#17303Closesapache#17872 ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#18017 from HyukjinKwon/close-inactive-prs.
What changes were proposed in this pull request?
It will throw a UnsupportedOperationException when a class's subfield has not supported type Encoder.
This PR will fallback to KryoSer/KryoDeser for this kind of subfields.
before fix
after
How was this patch tested?
unittest added