org.apache.hadoop.hive.ql.udf.generic
Class GenericUDFBaseCompare

java.lang.Object
  extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDF
      extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDFBaseCompare
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
GenericUDFOPEqual, GenericUDFOPEqualOrGreaterThan, GenericUDFOPEqualOrLessThan, GenericUDFOPGreaterThan, GenericUDFOPLessThan, GenericUDFOPNotEqual

public abstract class GenericUDFBaseCompare
extends GenericUDF

GenericUDF Base Class for operations.


Nested Class Summary
static class GenericUDFBaseCompare.CompareType
           
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDF
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject
 
Field Summary
protected  ObjectInspector[] argumentOIs
           
protected  BooleanObjectInspector boi0
           
protected  BooleanObjectInspector boi1
           
protected  ByteObjectInspector byoi0
           
protected  ByteObjectInspector byoi1
           
protected  ObjectInspector compareOI
           
protected  GenericUDFBaseCompare.CompareType compareType
           
protected  GenericUDFUtils.ReturnObjectInspectorResolver conversionHelper
           
protected  ObjectInspectorConverters.Converter converter0
           
protected  ObjectInspectorConverters.Converter converter1
           
protected  IntObjectInspector ioi0
           
protected  IntObjectInspector ioi1
           
protected  LongObjectInspector loi0
           
protected  LongObjectInspector loi1
           
protected  String opDisplayName
           
protected  String opName
           
protected  BooleanWritable result
           
protected  StringObjectInspector soi0
           
protected  StringObjectInspector soi1
           
 
Constructor Summary
GenericUDFBaseCompare()
           
 
Method Summary
 Integer compare(GenericUDF.DeferredObject[] arguments)
           
 String getDisplayString(String[] children)
          Get the String to be displayed in explain.
 ObjectInspector initialize(ObjectInspector[] arguments)
          Initialize this GenericUDF.
 
Methods inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDF
close, configure, evaluate, getRequiredFiles, getRequiredJars, initializeAndFoldConstants
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

opName

protected String opName

opDisplayName

protected String opDisplayName

argumentOIs

protected transient ObjectInspector[] argumentOIs

conversionHelper

protected transient GenericUDFUtils.ReturnObjectInspectorResolver conversionHelper

compareOI

protected ObjectInspector compareOI

compareType

protected GenericUDFBaseCompare.CompareType compareType

converter0

protected transient ObjectInspectorConverters.Converter converter0

converter1

protected transient ObjectInspectorConverters.Converter converter1

soi0

protected transient StringObjectInspector soi0

soi1

protected transient StringObjectInspector soi1

ioi0

protected transient IntObjectInspector ioi0

ioi1

protected transient IntObjectInspector ioi1

loi0

protected transient LongObjectInspector loi0

loi1

protected transient LongObjectInspector loi1

byoi0

protected transient ByteObjectInspector byoi0

byoi1

protected transient ByteObjectInspector byoi1

boi0

protected transient BooleanObjectInspector boi0

boi1

protected transient BooleanObjectInspector boi1

result

protected final BooleanWritable result
Constructor Detail

GenericUDFBaseCompare

public GenericUDFBaseCompare()
Method Detail

initialize

public ObjectInspector initialize(ObjectInspector[] arguments)
                           throws UDFArgumentException
Description copied from class: GenericUDF
Initialize this GenericUDF. This will be called once and only once per GenericUDF instance.

Specified by:
initialize in class GenericUDF
Parameters:
arguments - The ObjectInspector for the arguments
Returns:
The ObjectInspector for the return value
Throws:
UDFArgumentException - Thrown when arguments have wrong types, wrong length, etc.

compare

public Integer compare(GenericUDF.DeferredObject[] arguments)
                throws HiveException
Throws:
HiveException

getDisplayString

public String getDisplayString(String[] children)
Description copied from class: GenericUDF
Get the String to be displayed in explain.

Specified by:
getDisplayString in class GenericUDF


Copyright © 2012 The Apache Software Foundation