FAQ
Author: hashutosh
Date: Fri Jan 16 16:58:35 2015
New Revision: 1652458

URL: http://svn.apache.org/r1652458
Log:
HIVE-9377 : UDF in_file() in WHERE predicate causes NPE. (Mithun Radhakrishnan via Ashutosh Chauhan)

Modified:
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java?rev=1652458&r1=1652457&r2=1652458&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInFile.java Fri Jan 16 16:58:35 2015
@@ -140,6 +140,17 @@ public class GenericUDFInFile extends Ge
    }

    @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
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJan 16, '15 at 4:58p
activeJan 16, '15 at 4:58p
posts1
users1
websitehive.apache.org

1 user in discussion

Hashutosh: 1 post

People

Translate

site design / logo © 2021 Grokbase