[Bug]: DualInputNestedValueProvider is not able to get Value properly if input is RuntimeValueProvider.
What happened?
Background: DualInputNestedValueProvider https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/c7cb59f37766b7edfd0eb14f6f184f7c13b7909b/v1/src/main/java/com/google/cloud/teleport/util/DualInputNestedValueProvider.java#L29 is not in Apache Beam package. However, it uses ValueProvider from SDK.
The issue: If one of the input for DualInputNestedValueProvider is RuntimeValueProvider, then the input will still be a ValueProvider in input.getX() or input.getY() while we're expecting the real value of the ValueProvider should be fetched by the call.
Issue Priority
Priority: 3 (minor)
Issue Components
- [ ] Component: Python SDK
- [X] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam YAML
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
DualInputNestedValueProvider is not able to get Value properly
Is your code requesting the value happening in job submission time (e.g. pipeline expansion, transform's configuration) or run time (e.g. in processElement of a DoFn) ? If it is the latter, this WAI as RuntimeValueProvider's value weren't be available during pipeline submission time
The code is requesting the value at the runtime (e.g. in processElement of a DoFn).
In my case, when I was using DualInputNestedValueProvider, both X and Y are of the same type, ValueProvider<String>. When we're doing input.getX() and input.getY(), we are expecting to get the value. However, if X or Y is RuntimeValueProvider, input.getY() is still ValueProvider instead of String type.