Details
Description
This query fails with a NullPointerException on line 247:
SELECT POSEXPLODE(SPLIT(REGEXP_REPLACE(ranks, '[\\[ \\]]', ''), ',')) AS (rank, col0) FROM table;
The problem is that POSEXPLODE is causing the REGEXP_REPLACE to be serialized after it is instantiated. The null value is a transient StringBuffer that should hold the result. The fix is to make the result value lazy.
Attachments
Issue Links
- is duplicated by
-
SPARK-13819 using a regexp_replace in a group by clause raises a nullpointerexception
- Resolved
- relates to
-
SPARK-18387 Test that expressions can be serialized
- Resolved
- links to