spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-18368) Regular expression replace throws NullPointerException when serialized
Date Tue, 08 Nov 2016 23:03:58 GMT

     [ 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message