org.apache.hadoop.hive.serde2.objectinspector.primitive.VoidObjectInspector Java Examples
The following examples show how to use
org.apache.hadoop.hive.serde2.objectinspector.primitive.VoidObjectInspector.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CacheableObjectInspectorConverters.java From transport with BSD 2-Clause "Simplified" License | 6 votes |
public StructConverter(ObjectInspector inputOI, SettableStructObjectInspector outputOI) { if (inputOI instanceof StructObjectInspector) { this.inputOI = (StructObjectInspector) inputOI; this.outputOI = outputOI; inputFields = this.inputOI.getAllStructFieldRefs(); outputFields = outputOI.getAllStructFieldRefs(); // If the output has some extra fields, set them to NULL. int minFields = Math.min(inputFields.size(), outputFields.size()); fieldConverters = new ArrayList<Converter>(minFields); for (int f = 0; f < minFields; f++) { fieldConverters.add(getConverter(inputFields.get(f).getFieldObjectInspector(), outputFields.get(f).getFieldObjectInspector())); } } else if (!(inputOI instanceof VoidObjectInspector)) { throw new UnsupportedOperationException( "Hive internal error: conversion of " + inputOI.getTypeName() + " to " + outputOI.getTypeName() + "not supported yet."); } }
Example #2
Source File: CacheableObjectInspectorConverters.java From transport with BSD 2-Clause "Simplified" License | 6 votes |
public MapConverter(ObjectInspector inputOI, SettableMapObjectInspector outputOI) { if (inputOI instanceof MapObjectInspector) { this.inputOI = (MapObjectInspector) inputOI; this.outputOI = outputOI; inputKeyOI = this.inputOI.getMapKeyObjectInspector(); outputKeyOI = outputOI.getMapKeyObjectInspector(); inputValueOI = this.inputOI.getMapValueObjectInspector(); outputValueOI = outputOI.getMapValueObjectInspector(); keyConverter = getConverter(inputKeyOI, outputKeyOI); valueConverter = getConverter(inputValueOI, outputValueOI); } else if (!(inputOI instanceof VoidObjectInspector)) { throw new UnsupportedOperationException( "Hive internal error: conversion of " + inputOI.getTypeName() + " to " + outputOI.getTypeName() + "not supported yet."); } }
Example #3
Source File: CacheableObjectInspectorConverters.java From transport with BSD 2-Clause "Simplified" License | 5 votes |
public ListConverter(ObjectInspector inputOI, SettableListObjectInspector outputOI) { if (inputOI instanceof ListObjectInspector) { this.inputOI = (ListObjectInspector) inputOI; this.outputOI = outputOI; inputElementOI = this.inputOI.getListElementObjectInspector(); outputElementOI = outputOI.getListElementObjectInspector(); elementConverter = getConverter(inputElementOI, outputElementOI); } else if (!(inputOI instanceof VoidObjectInspector)) { throw new UnsupportedOperationException( "Hive internal error: conversion of " + inputOI.getTypeName() + " to " + outputOI.getTypeName() + "not supported yet."); } }
Example #4
Source File: HiveTypeSystem.java From transport with BSD 2-Clause "Simplified" License | 4 votes |
@Override protected boolean isUnknownType(ObjectInspector dataType) { return dataType instanceof VoidObjectInspector; }
Example #5
Source File: HiveUnknownType.java From transport with BSD 2-Clause "Simplified" License | 4 votes |
public HiveUnknownType(VoidObjectInspector voidObjectInspector) { _voidObjectInspector = voidObjectInspector; }