-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support struct for Java #259
Conversation
1a85668
to
9f36a57
Compare
|
||
public class LiteralStructDeserializer extends StdDeserializer<Literal> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was confusing to use Literal
as the target but expect a Struct
.
interface WriteGenericFunction { | ||
void write(JsonGenerator gen, Struct.Value value) throws IOException; | ||
gen.writeFieldName(VALUE); | ||
new StructSerializer().serialize(value.scalar().generic(), gen, serializerProvider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to serialize a tree that can be directly deserialized into an auto-value object, which is exactly what StructSerializer
does.
import org.flyte.api.v1.LiteralType; | ||
import org.flyte.flytekit.jackson.JacksonLiteralMap; | ||
|
||
public class LiteralMapDeserializers extends Deserializers.Base { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer be used since we don't do a dynamic lookup anymore.
|
||
@Override | ||
public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) { | ||
return new SdkBindingDataDeserializer(property.getType().containedType(0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a funny way to get bean property context.
8fb94fb
to
ff12243
Compare
e40e5c2
to
e903e57
Compare
I can no longer run IT locally because testcontainers generates a warning |
Trying a fix in #261. |
6ea206b
to
8284ee3
Compare
724849c
to
7032727
Compare
@@ -1,3 +1,3 @@ | |||
version=2.5.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not support scala212source3
.
6742be4
to
8a84063
Compare
b207975
to
768b8bc
Compare
} | ||
|
||
@AutoValue | ||
public abstract static class StructInput { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only discovered these classes in a very late stage so I did not bother adapting test cases to use these.
Signed-off-by: Hongxin Liang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
This branch targets blob branch. Now #258 is a bit hard to review. |
Signed-off-by: Hongxin Liang <[email protected]>
oh! I didn't notice that, don't worry, I will continue with the blob's PR |
Signed-off-by: Hongxin Liang <[email protected]>
* Bring back Blob support Signed-off-by: Hongxin Liang <[email protected]> * Remove BlobTypeDescription Signed-off-by: Hongxin Liang <[email protected]> * Add blob back Signed-off-by: Hongxin Liang <[email protected]> * Blob in list and map Signed-off-by: Hongxin Liang <[email protected]> * Clean up Signed-off-by: Hongxin Liang <[email protected]> * Support struct (#259) Signed-off-by: Hongxin Liang <[email protected]> * Support struct in Scala layer (#262) Signed-off-by: Hongxin Liang <[email protected]> --------- Signed-off-by: Hongxin Liang <[email protected]>
Read then delete this section
TL;DR
Support nested auto-value as input parameters.
Type
Are all requirements met?
Complete description
This is to add support for things like:
Scala layer is not supported yet because it is completely different mechanism.
Tracking Issue
_NA
Follow-up issue
NA