[ https://issues.apache.org/jira/browse/SPARK-18368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-18368: ------------------------------------ Assignee: (was: Apache Spark) > Regular expression replace throws NullPointerException when serialized > ---------------------------------------------------------------------- > > Key: SPARK-18368 > URL: https://issues.apache.org/jira/browse/SPARK-18368 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.0.1, 2.1.0 > Reporter: Ryan Blue > > This query fails with a [NullPointerException on line > 247|https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala#L247]: > {code} > SELECT POSEXPLODE(SPLIT(REGEXP_REPLACE(ranks, '[\\[ \\]]', ''), ',')) AS > (rank, col0) FROM table; > {code} > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org