From 8d360baafdfeb123afc77caf4ae8af709866571a Mon Sep 17 00:00:00 2001 From: Hongxin Liang Date: Sat, 7 Oct 2023 19:01:12 +0200 Subject: [PATCH] Bring back Blob support Signed-off-by: Hongxin Liang --- .../java/org/flyte/flytekit/SdkBindingDataFactory.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flytekit-java/src/main/java/org/flyte/flytekit/SdkBindingDataFactory.java b/flytekit-java/src/main/java/org/flyte/flytekit/SdkBindingDataFactory.java index ac183ad8d..f0a5b82f8 100644 --- a/flytekit-java/src/main/java/org/flyte/flytekit/SdkBindingDataFactory.java +++ b/flytekit-java/src/main/java/org/flyte/flytekit/SdkBindingDataFactory.java @@ -124,6 +124,10 @@ public static SdkBindingData> of(SdkLiteralType elementType, List return SdkBindingData.literal(collections(elementType), collection); } + public static SdkBindingData of(SdkLiteralType type, T value) { + return SdkBindingData.literal(type, value); + } + /** * Creates a {@code SdkBindingData} for a flyte Blob with the given value. * @@ -307,4 +311,8 @@ public static SdkBindingData> ofBindingMap( return SdkBindingData.bindingMap(valuesType, valueMap); } + + public static SdkBindingData of(Blob value) { + return SdkBindingData.literal(SdkLiteralTypes.blobs(value.metadata().type()), value); + } }