public LazyObjectInspectorParametersImpl(LazyObjectInspectorParameters lazyParams) { this.escaped = lazyParams.isEscaped(); this.escapeChar = lazyParams.getEscapeChar(); this.extendedBooleanLiteral = lazyParams.isExtendedBooleanLiteral(); this.timestampFormats = lazyParams.getTimestampFormats(); this.separators = lazyParams.getSeparators(); this.nullSequence = lazyParams.getNullSequence(); this.lastColumnTakesRest = lazyParams.isLastColumnTakesRest(); }
private static void addCommonLazyParamsToSignature(LazyObjectInspectorParameters lazyParams, List<Object> signature) { signature.add(lazyParams.isEscaped()); signature.add(lazyParams.getEscapeChar()); signature.add(lazyParams.isExtendedBooleanLiteral()); signature.add(lazyParams.getTimestampFormats()); } }
signature.add(structFieldObjectInspectors); signature.add(Byte.valueOf(separator)); signature.add(lazyParams.getNullSequence().toString()); signature.add(Boolean.valueOf(lazyParams.isLastColumnTakesRest())); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); signature.add(option);
/** * Returns the NullSequence for this array. Called by LazyArray.init(...). */ public Text getNullSequence() { return lazyParams.getNullSequence(); }
public byte getEscapeChar() { return lazyParams.getEscapeChar(); }
public boolean isEscaped() { return lazyParams.isEscaped(); }
/** * Create a hierarchical ObjectInspector for LazyStruct with the given * columnNames and columnTypeInfos. * * @param lazyParams parameters for the lazy types * @throws SerDeException * @see LazyFactory#createLazyObjectInspector(TypeInfo, byte[], int, Text, * boolean, byte) */ public static ObjectInspector createLazyStructInspector( List<String> columnNames, List<TypeInfo> typeInfos, LazyObjectInspectorParameters lazyParams) throws SerDeException { ArrayList<ObjectInspector> columnObjectInspectors = new ArrayList<ObjectInspector>( typeInfos.size()); for (int i = 0; i < typeInfos.size(); i++) { columnObjectInspectors.add(LazyFactory.createLazyObjectInspector( typeInfos.get(i), 1, lazyParams, ObjectInspectorOptions.JAVA)); } return LazyObjectInspectorFactory.getLazySimpleStructObjectInspector( columnNames, columnObjectInspectors, null, lazyParams.getSeparators()[0], lazyParams, ObjectInspectorOptions.JAVA); }
public boolean getLastColumnTakesRest() { return lazyParams.isLastColumnTakesRest(); }
public static AbstractPrimitiveLazyObjectInspector<?> getLazyObjectInspector( PrimitiveTypeInfo typeInfo, LazyObjectInspectorParameters lazyParams) { PrimitiveCategory primitiveCategory = typeInfo.getPrimitiveCategory(); switch(primitiveCategory) { case STRING: return getLazyStringObjectInspector(lazyParams.isEscaped(), lazyParams.getEscapeChar()); case CHAR: return getLazyHiveCharObjectInspector((CharTypeInfo)typeInfo, lazyParams.isEscaped(), lazyParams.getEscapeChar()); case VARCHAR: return getLazyHiveVarcharObjectInspector((VarcharTypeInfo)typeInfo, lazyParams.isEscaped(), lazyParams.getEscapeChar()); case BOOLEAN: return getLazyBooleanObjectInspector(lazyParams.isExtendedBooleanLiteral()); case TIMESTAMP: return getLazyTimestampObjectInspector(lazyParams.getTimestampFormats()); default: return getLazyObjectInspector(typeInfo); } }
public Text getNullSequence() { return lazyParams.getNullSequence(); }
public byte getEscapeChar() { return lazyParams.getEscapeChar(); }
public boolean isEscaped() { return lazyParams.isEscaped(); }
signature.add(structFieldObjectInspectors); signature.add(Byte.valueOf(separator)); signature.add(lazyParams.getNullSequence().toString()); signature.add(Boolean.valueOf(lazyParams.isLastColumnTakesRest())); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); signature.add(option);
createLazyObjectInspector(((MapTypeInfo) typeInfo).getMapValueTypeInfo(), separatorIndex + 2, lazyParams, option), LazyUtils.getSeparator(lazyParams.getSeparators(), separatorIndex), LazyUtils.getSeparator(lazyParams.getSeparators(), separatorIndex+1), lazyParams); case LIST: createLazyObjectInspector(((ListTypeInfo) typeInfo) .getListElementTypeInfo(), separatorIndex + 1, lazyParams, option), LazyUtils.getSeparator(lazyParams.getSeparators(), separatorIndex), lazyParams); case STRUCT: LazyUtils.getSeparator(lazyParams.getSeparators(), separatorIndex), lazyParams, option); case UNION: LazyUtils.getSeparator(lazyParams.getSeparators(), separatorIndex), lazyParams);
public boolean getLastColumnTakesRest() { return lazyParams.isLastColumnTakesRest(); }
public LazyObjectInspectorParametersImpl(LazyObjectInspectorParameters lazyParams) { this.escaped = lazyParams.isEscaped(); this.escapeChar = lazyParams.getEscapeChar(); this.extendedBooleanLiteral = lazyParams.isExtendedBooleanLiteral(); this.timestampFormats = lazyParams.getTimestampFormats(); this.separators = lazyParams.getSeparators(); this.nullSequence = lazyParams.getNullSequence(); this.lastColumnTakesRest = lazyParams.isLastColumnTakesRest(); }
private static void addCommonLazyParamsToSignature(LazyObjectInspectorParameters lazyParams, List<Object> signature) { signature.add(lazyParams.isEscaped()); signature.add(lazyParams.getEscapeChar()); signature.add(lazyParams.isExtendedBooleanLiteral()); signature.add(lazyParams.getTimestampFormats()); } }
public Text getNullSequence() { return lazyParams.getNullSequence(); }
public byte getEscapeChar() { return lazyParams.getEscapeChar(); }
public boolean isEscaped() { return lazyParams.isEscaped(); }