scio icon indicating copy to clipboard operation
scio copied to clipboard

error message for partitionByKey makaes debugging a bit difficult

Open snallapa opened this issue 1 year ago • 1 comments

when using partitionByKey if the pipeline encounters a key that is not in the input set. Right now you get:

org.apache.beam.sdk.util.UserCodeException: java.lang.IndexOutOfBoundsException: Partition function returned out of bounds index: -1 not in [0..2)

It would be great if the key that was not in the input set was printed, maybe even alongside the input set like keyset: [], missing key: []

snallapa avatar Sep 03 '24 19:09 snallapa

For specifically partitionByKey we are providing the partition function so should be able to capture the key not found when index is returned as -1

kellen avatar Sep 03 '24 20:09 kellen