File tree Expand file tree Collapse file tree 4 files changed +7
-10
lines changed
flytekit-scala_2.13/src/main/scala/org/flyte Expand file tree Collapse file tree 4 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 17
17
package org .flyte .flytekit
18
18
19
19
import org .flyte .api .v1 .BindingData
20
- import org .flyte .flytekit .SdkBindingData .Literal
21
20
import org .flyte .flytekitscala .SdkLiteralTypes .collections
22
21
23
22
import java .util .function
24
23
import scala .collection .JavaConverters ._
25
24
26
- private [flyte] class BindingCollection [T ](
25
+ private [flyte] case class BindingCollection [T ](
27
26
elementType : SdkLiteralType [T ],
28
27
bindingCollection : List [SdkBindingData [T ]]
29
28
) extends SdkBindingData [List [T ]] {
Original file line number Diff line number Diff line change 17
17
package org .flyte .flytekit
18
18
19
19
import org .flyte .api .v1 .BindingData
20
- import org .flyte .flytekit .SdkBindingData .Literal
21
20
import org .flyte .flytekitscala .SdkLiteralTypes .maps
22
21
23
22
import java .util .function
24
23
import scala .collection .JavaConverters ._
25
24
26
- private [flyte] class BindingMap [T ](
25
+ private [flyte] case class BindingMap [T ](
27
26
valuesType : SdkLiteralType [T ],
28
27
bindingMap : Map [String , SdkBindingData [T ]]
29
28
) extends SdkBindingData [Map [String , T ]] {
Original file line number Diff line number Diff line change @@ -18,10 +18,9 @@ package org.flyte
18
18
19
19
/** Contains subclasses for [[SdkBindingData ]]. We are forced to define this
20
20
* package here because [[SdkBindingData#idl() ]] is package private (we don´t
21
- * want to expose it to users). We cannot make it protected either as it would
22
- * be good for the own object but both implementations deal with list or maps
23
- * of [[SdkBindingData ]] and therefore cannot call this method because it is in
24
- * a different class.
21
+ * want to expose it to users). Making it protected doesn't help either because
22
+ * list or map needs to call this method of elements so that requires it to be
23
+ * public.
25
24
*
26
25
* This is not ideal because we are splitting the flytekit package in two maven
27
26
* modules. This would create problems when we decide to add java 9 style
Original file line number Diff line number Diff line change @@ -353,7 +353,7 @@ object SdkBindingDataFactory {
353
353
elementType : SdkLiteralType [T ],
354
354
elements : List [SdkBindingData [T ]]
355
355
): SdkBindingData [List [T ]] = {
356
- new BindingCollection (elementType, elements)
356
+ BindingCollection (elementType, elements)
357
357
}
358
358
359
359
/** Creates a [[SdkBindingData ]] for a flyte map given a java
@@ -372,7 +372,7 @@ object SdkBindingDataFactory {
372
372
valuesType : SdkLiteralType [T ],
373
373
valueMap : Map [String , SdkBindingData [T ]]
374
374
): SdkBindingData [Map [String , T ]] =
375
- new BindingMap (valuesType, valueMap)
375
+ BindingMap (valuesType, valueMap)
376
376
377
377
private def toSdkLiteralType (
378
378
value : Any ,
You can’t perform that action at this time.
0 commit comments