For sufficiently wide or nested Java Objects, when SpecificSafeProjection attempts to recreate the object from an InternalRow, the generated SpecificSafeProjection.apply method is larger than allowed:
Although related, this issue appears not to have been resolved by
SPARK-15285. Since there is only one top-level object when projecting, splitExpressions finds no additional Expressions to split. The result is a single large, nested Expression that forms the apply code.
See the reproducer for an example .