dnamaz commented on PR #37036:
URL: https://github.com/apache/beam/pull/37036#issuecomment-3624958732
There is a problem with one of the tests, it is happening in this file:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/StateFetchingIterators.java
on line 302,
`public static <T> Block<T> fromValues(List<T> values, @Nullable ByteString
nextToken) {
if (values.isEmpty() && nextToken == null) {
return emptyBlock();
}
ImmutableList<T> immutableValues = ImmutableList.copyOf(values);
long listWeight = immutableValues.size() * Caches.REFERENCE_SIZE;
for (T value : immutableValues) {
listWeight = LongMath.saturatedAdd(listWeight,
Caches.weigh(value));
}
return fromValues(immutableValues, listWeight, nextToken);
}`
will throw a null pointer exception if the value is null. I believe this is
causing the issue with the PR check failing in the test.
testSideInputWithNullDefault,
should this be fixed and expected in the test or modify the collection to
use a null safe list? should it be part of this PR or create another bug? Does
this currently happen in other PR checks? Am i missing something?
The call chain is:
ViewTest.processElement (line 824) calls c.sideInput(view)
→ FnApiDoFnRunner.sideInput()
→ FnApiStateAccessor.get()
→ SingletonViewFn2.apply() iterates through the side input
→ CachingStateIterator.hasNext() loads the next block
→ Block.fromValues() at line 315 - calls ImmutableList.copyOf() which fails
on null
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]