-
- Downloads
[SPARK-18368][SQL] Fix regexp replace when serialized
## What changes were proposed in this pull request? This makes the result value both transient and lazy, so that if the RegExpReplace object is initialized then serialized, `result: StringBuffer` will be correctly initialized. ## How was this patch tested? * Verified that this patch fixed the query that found the bug. * Added a test case that fails without the fix. Author: Ryan Blue <blue@apache.org> Closes #15834 from rdblue/SPARK-18368-fix-regexp-replace. (cherry picked from commit d4028de9) Signed-off-by:Yin Huai <yhuai@databricks.com>
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala 1 addition, 1 deletion...he/spark/sql/catalyst/expressions/regexpExpressions.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RegexpExpressionsSuite.scala 15 additions, 1 deletion...ark/sql/catalyst/expressions/RegexpExpressionsSuite.scala
Please register or sign in to comment