-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-16514] [SQL] Fix various regex codegen bugs #14168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@ericl please open a JIRA ticket for this. Thanks. |
Sure |
Test build #62202 has finished for PR 14168 at commit
|
Thanks - merging in master/2.0. |
@ericl as an alternative, did you consider simply defining |
## What changes were proposed in this pull request? RegexExtract and RegexReplace currently crash on non-nullable input due use of a hard-coded local variable name (e.g. compiles fail with `java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 85, Column 26: Redefinition of local variable "m" `). This changes those variables to use fresh names, and also in a few other places. ## How was this patch tested? Unit tests. rxin Author: Eric Liang <ekl@databricks.com> Closes #14168 from ericl/sc-3906. (cherry picked from commit 1c58fa9) Signed-off-by: Reynold Xin <rxin@databricks.com>
## What changes were proposed in this pull request? RegexExtract and RegexReplace currently crash on non-nullable input due use of a hard-coded local variable name (e.g. compiles fail with `java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 85, Column 26: Redefinition of local variable "m" `). This changes those variables to use fresh names, and also in a few other places. ## How was this patch tested? Unit tests. rxin Author: Eric Liang <ekl@databricks.com> Closes #14168 from ericl/sc-3906. (cherry picked from commit 1c58fa9) Signed-off-by: Reynold Xin <rxin@databricks.com>
@sameeragarwal that's a good defensive measure. |
## What changes were proposed in this pull request? RegexExtract and RegexReplace currently crash on non-nullable input due use of a hard-coded local variable name (e.g. compiles fail with `java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 85, Column 26: Redefinition of local variable "m" `). This changes those variables to use fresh names, and also in a few other places. ## How was this patch tested? Unit tests. rxin Author: Eric Liang <ekl@databricks.com> Closes apache#14168 from ericl/sc-3906. (cherry picked from commit 1c58fa9) Signed-off-by: Reynold Xin <rxin@databricks.com> (cherry picked from commit 9808735)
…expressions ## What changes were proposed in this pull request? This patch is just a slightly safer way to fix the issue we encountered in #14168 should this pattern re-occur at other places in the code. ## How was this patch tested? Existing tests. Also, I manually tested that it fixes the problem in SPARK-16514 without having the proposed change in #14168 Author: Sameer Agarwal <sameerag@cs.berkeley.edu> Closes #14227 from sameeragarwal/codegen.
…expressions ## What changes were proposed in this pull request? This patch is just a slightly safer way to fix the issue we encountered in #14168 should this pattern re-occur at other places in the code. ## How was this patch tested? Existing tests. Also, I manually tested that it fixes the problem in SPARK-16514 without having the proposed change in #14168 Author: Sameer Agarwal <sameerag@cs.berkeley.edu> Closes #14227 from sameeragarwal/codegen. (cherry picked from commit a1ffbad) Signed-off-by: Reynold Xin <rxin@databricks.com>
What changes were proposed in this pull request?
RegexExtract and RegexReplace currently crash on non-nullable input due use of a hard-coded local variable name (e.g. compiles fail with
java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 85, Column 26: Redefinition of local variable "m"
).This changes those variables to use fresh names, and also in a few other places.
How was this patch tested?
Unit tests. @rxin