FAQ
Repository: hive
Updated Branches:
   refs/heads/branch-1.0 a4523cfa7 -> f89aac53c


HIVE-9377 : UDF in_file() in WHERE predicate causes NPE. (Mithun Radhakrishnan via Ashutosh Chauhan)

git-svn-id: https://svn.apache.org/repos/asf/hive/trunk@1652458 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/f89aac53
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/f89aac53
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/f89aac53

Branch: refs/heads/branch-1.0
Commit: f89aac53c9bc2ff3b0c62396c6caa19a44527857
Parents: a4523cf
Author: Ashutosh Chauhan <hashutosh@apache.org>
Authored: Fri Jan 16 16:58:35 2015 +0000
Committer: Jason Dere <jdere@hortonworks.com>
Committed: Mon Aug 10 19:36:30 2015 -0700

----------------------------------------------------------------------
  .../hadoop/hive/ql/udf/generic/GenericUDFInFile.java | 11 +++++++++++
  1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/f89aac53/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java
index 7f15b6d..cf5869a 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java
@@ -140,6 +140,17 @@ public class GenericUDFInFile extends GenericUDF {
    }

    @Override
+ public void copyToNewInstance(Object newInstance) throws UDFArgumentException {
+ super.copyToNewInstance(newInstance); // Asserts the class invariant. (Same types.)
+ GenericUDFInFile that = (GenericUDFInFile)newInstance;
+ if (that != this) {
+ that.set = (this.set == null ? null : (HashSet<String>)this.set.clone());
+ that.strObjectInspector = this.strObjectInspector;
+ that.fileObjectInspector = this.fileObjectInspector;
+ }
+ }
+
+ @Override
    public String getDisplayString(String[] children) {
      assert (children.length == 2);
      return "in_file(" + children[0] + ", " + children[1] + ")";

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedAug 11, '15 at 2:39a
activeAug 11, '15 at 2:39a
posts1
users1
websitehive.apache.org

1 user in discussion

Jdere: 1 post

People

Translate

site design / logo © 2021 Grokbase