Skip to content

Commit 61cb452

Browse files
author
Koji Noguchi
committed
PIG-5389: Passing null to REPLACE udf preventing JIT optimization (knoguchi)
git-svn-id: https://svn.apache.org/repos/asf/pig/trunk@1862503 13f79535-47bb-0310-9956-ffa450edef68
1 parent 1e664f2 commit 61cb452

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ PIG-5282: Upgade to Java 8 (satishsaley via rohini)
2626

2727
IMPROVEMENTS
2828

29+
PIG-5389: Passing null to REPLACE udf preventing JIT optimization (knoguchi)
30+
2931
PIG-5382: Log the name when POStore fails on write (knoguchi)
3032

3133
PIG-5255: Improvements to bloom join (satishsaley via rohini)

src/org/apache/pig/builtin/REPLACE.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public String exec(Tuple input) throws IOException {
5858
String source = (String)input.get(0);
5959
String target = (String)input.get(1);
6060

61+
if (source == null) {
62+
return null;
63+
}
64+
6165
if (target == null) {
6266
warn("Replace : Regular expression is null", PigWarning.UDF_WARNING_1);
6367
return null;

0 commit comments

Comments
 (0)