In core/src/test/java/io/substrait/TestBase.java, protoExpressionConverter is a field initializer (lines 36-41) that reads protoRelConverter, but protoRelConverter is declared without an initializer (line 32) and only assigned in the constructor body (line 50).
Java runs field initializers before the constructor body, so protoExpressionConverter is always constructed with relConverter == null. ProtoExpressionConverter stores it unchecked (only rootType is requireNonNull'd), so nothing fails at construction time — the null just sits there.
Consequence: TestBase.verifyRoundTrip(Expression) (line 61) NPEs for any expression that needs the rel converter, i.e. anything containing a subquery. TestBase is extended by ~44 test classes, so this silently narrows what the shared helper can cover.
Fix: assign protoExpressionConverter in the constructor body after protoRelConverter, and add a round-trip test over a subquery-bearing expression to pin it.
In
core/src/test/java/io/substrait/TestBase.java,protoExpressionConverteris a field initializer (lines 36-41) that readsprotoRelConverter, butprotoRelConverteris declared without an initializer (line 32) and only assigned in the constructor body (line 50).Java runs field initializers before the constructor body, so
protoExpressionConverteris always constructed withrelConverter == null.ProtoExpressionConverterstores it unchecked (onlyrootTypeisrequireNonNull'd), so nothing fails at construction time — the null just sits there.Consequence:
TestBase.verifyRoundTrip(Expression)(line 61) NPEs for any expression that needs the rel converter, i.e. anything containing a subquery.TestBaseis extended by ~44 test classes, so this silently narrows what the shared helper can cover.Fix: assign
protoExpressionConverterin the constructor body afterprotoRelConverter, and add a round-trip test over a subquery-bearing expression to pin it.