@Override public void evaluate(VectorizedRowBatch batch) throws HiveException { if (!initialized) { Object lVal = leftDynamicValue.getValue(); Object rVal = rightDynamicValue.getValue(); if (lVal == null || rVal == null) { isLeftOrRightNull = true; } else { byte[] min = (PrimitiveObjectInspectorUtils.getHiveChar( lVal, leftDynamicValue.getObjectInspector()).getStrippedValue().getBytes()); setLeftValue(min); byte[] max = (PrimitiveObjectInspectorUtils.getHiveChar( rVal, rightDynamicValue.getObjectInspector()).getStrippedValue().getBytes()); setRightValue(max); } initialized = true; } // Special case for dynamic values - min/max can be null if (isLeftOrRightNull) { // Entire batch is filtered out batch.size = 0; } super.evaluate(batch); } }
@Override public void evaluate(VectorizedRowBatch batch) { if (!initialized) { Object lVal = leftDynamicValue.getValue(); Object rVal = rightDynamicValue.getValue(); if (lVal == null || rVal == null) { isLeftOrRightNull = true; } else { byte[] min = (PrimitiveObjectInspectorUtils.getHiveChar( lVal, leftDynamicValue.getObjectInspector()).getStrippedValue().getBytes()); setLeftValue(min); byte[] max = (PrimitiveObjectInspectorUtils.getHiveChar( rVal, rightDynamicValue.getObjectInspector()).getStrippedValue().getBytes()); setRightValue(max); } initialized = true; } // Special case for dynamic values - min/max can be null if (isLeftOrRightNull) { // Entire batch is filtered out batch.size = 0; } super.evaluate(batch); } }
@Override public Object convert(Object input) { if (input == null) { return null; } switch (inputOI.getPrimitiveCategory()) { case BOOLEAN: return outputOI.set(hc, ((BooleanObjectInspector) inputOI).get(input) ? new HiveChar("TRUE", -1) : new HiveChar("FALSE", -1)); default: return outputOI.set(hc, PrimitiveObjectInspectorUtils.getHiveChar(input, inputOI)); } } }
return PrimitiveObjectInspectorUtils.getHiveChar(input, (HiveCharObjectInspector) argumentOI); case DATE: return PrimitiveObjectInspectorUtils.getDate(input, (DateObjectInspector) argumentOI);
PrimitiveObjectInspectorUtils.getHiveChar( object, sourcePrimitiveOI); if (hiveChar == null) {
PrimitiveObjectInspectorUtils.getHiveChar( object, convertSourcePrimitiveObjectInspectors[logicalColumnIndex]); if (hiveChar == null) {
@Override public Object convert(Object input) { if (input == null) { return null; } switch (inputOI.getPrimitiveCategory()) { case BOOLEAN: return outputOI.set(hc, ((BooleanObjectInspector) inputOI).get(input) ? new HiveChar("TRUE", -1) : new HiveChar("FALSE", -1)); default: return outputOI.set(hc, PrimitiveObjectInspectorUtils.getHiveChar(input, inputOI)); } } }
@Override public Object convert(Object input) { if (input == null) { return null; } switch (inputOI.getPrimitiveCategory()) { case BOOLEAN: return outputOI.set(hc, ((BooleanObjectInspector) inputOI).get(input) ? new HiveChar("TRUE", -1) : new HiveChar("FALSE", -1)); default: return outputOI.set(hc, PrimitiveObjectInspectorUtils.getHiveChar(input, inputOI)); } } }
@Override public Object convert(Object input) { if (input == null) { return null; } switch (inputOI.getPrimitiveCategory()) { case BOOLEAN: return outputOI.set(hc, ((BooleanObjectInspector) inputOI).get(input) ? new HiveChar("TRUE", -1) : new HiveChar("FALSE", -1)); default: return outputOI.set(hc, PrimitiveObjectInspectorUtils.getHiveChar(input, inputOI)); } } }
@Override public Object convert(Object input) { if (input == null) { return null; } switch (inputOI.getPrimitiveCategory()) { case BOOLEAN: return outputOI.set(hc, ((BooleanObjectInspector) inputOI).get(input) ? new HiveChar("TRUE", -1) : new HiveChar("FALSE", -1)); default: return outputOI.set(hc, PrimitiveObjectInspectorUtils.getHiveChar(input, inputOI)); } } }
@Override public Object convert(Object input) { if (input == null) { return null; } HiveCharWritable hc = new HiveCharWritable(); switch (inputOI.getPrimitiveCategory()) { case BOOLEAN: return outputOI.set(hc, ((BooleanObjectInspector) inputOI).get(input) ? new HiveChar("TRUE", -1) : new HiveChar("FALSE", -1)); default: return outputOI.set(hc, PrimitiveObjectInspectorUtils.getHiveChar(input, inputOI)); } } }
@Override public Object convert(Object input) { if (input == null) { return null; } HiveCharWritable hc = new HiveCharWritable(); switch (inputOI.getPrimitiveCategory()) { case BOOLEAN: return outputOI.set(hc, ((BooleanObjectInspector) inputOI).get(input) ? new HiveChar("TRUE", -1) : new HiveChar("FALSE", -1)); default: return outputOI.set(hc, PrimitiveObjectInspectorUtils.getHiveChar(input, inputOI)); } } }
return PrimitiveObjectInspectorUtils.getHiveChar(input, (HiveCharObjectInspector) argumentOI); case DATE: return PrimitiveObjectInspectorUtils.getDate(input, (DateObjectInspector) argumentOI);