public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, LazyObjectInspectorParameters lazyParams) { ArrayList<Object> signature = new ArrayList<Object>(); signature.add(listElementObjectInspector); signature.add(Byte.valueOf(separator)); signature.add(lazyParams.getNullSequence().toString()); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); LazyListObjectInspector result = cachedLazySimpleListObjectInspector .get(signature); if (result == null) { result = new LazyListObjectInspector(listElementObjectInspector, separator, lazyParams); LazyListObjectInspector prev = cachedLazySimpleListObjectInspector.putIfAbsent(signature, result); if (prev != null) { result = prev; } } return result; }
parsed = true; byte separator = oi.getSeparator(); boolean isEscaped = oi.isEscaped(); byte escapeChar = oi.getEscapeChar();
/** * Get the element without checking out-of-bound index. */ private Object uncheckedGetElement(int index) { if (elementInited[index]) { return arrayElements[index].getObject(); } elementInited[index] = true; int elementStart = startPosition[index]; int elementLength = startPosition[index + 1] - elementStart - 1; if (arrayElements[index] == null) { arrayElements[index] = LazyFactory.createLazyObject(oi.getListElementObjectInspector()); } if (isNull(oi.getNullSequence(), bytes, elementStart, elementLength)) { arrayElements[index].setNull(); } else { arrayElements[index].init(bytes, elementStart, elementLength); } return arrayElements[index].getObject(); }
/** * Get the element without checking out-of-bound index. */ private Object uncheckedGetElement(int index) { Text nullSequence = oi.getNullSequence(); int elementLength = startPosition[index + 1] - startPosition[index] - 1; if (elementLength == nullSequence.getLength() && 0 == LazyUtils .compare(bytes.getData(), startPosition[index], elementLength, nullSequence.getBytes(), 0, nullSequence.getLength())) { return null; } else { if (!elementInited[index]) { elementInited[index] = true; if (arrayElements[index] == null) { arrayElements[index] = LazyFactory .createLazyObject(((ListObjectInspector) oi) .getListElementObjectInspector()); } arrayElements[index].init(bytes, startPosition[index], elementLength); } } return arrayElements[index].getObject(); }
parsed = true; byte separator = oi.getSeparator(); boolean isEscaped = oi.isEscaped(); byte escapeChar = oi.getEscapeChar();
/** * Get the element without checking out-of-bound index. */ private Object uncheckedGetElement(int index) { if (elementInited[index]) { return arrayElements[index].getObject(); } elementInited[index] = true; int elementStart = startPosition[index]; int elementLength = startPosition[index + 1] - elementStart - 1; if (arrayElements[index] == null) { arrayElements[index] = LazyFactory.createLazyObject(oi.getListElementObjectInspector()); } if (isNull(oi.getNullSequence(), bytes, elementStart, elementLength)) { arrayElements[index].setNull(); } else { arrayElements[index].init(bytes, elementStart, elementLength); } return arrayElements[index].getObject(); }
public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, Text nullSequence, boolean escaped, byte escapeChar) { ArrayList<Object> signature = new ArrayList<Object>(); signature.add(listElementObjectInspector); signature.add(Byte.valueOf(separator)); signature.add(nullSequence.toString()); signature.add(Boolean.valueOf(escaped)); signature.add(Byte.valueOf(escapeChar)); LazyListObjectInspector result = cachedLazySimpleListObjectInspector .get(signature); if (result == null) { result = new LazyListObjectInspector(listElementObjectInspector, separator, nullSequence, escaped, escapeChar); cachedLazySimpleListObjectInspector.put(signature, result); } return result; }
parsed = true; byte separator = oi.getSeparator(); boolean isEscaped = oi.isEscaped(); byte escapeChar = oi.getEscapeChar();
/** * Get the element without checking out-of-bound index. */ private Object uncheckedGetElement(int index) { if (elementInited[index]) { return arrayElements[index].getObject(); } elementInited[index] = true; int elementStart = startPosition[index]; int elementLength = startPosition[index + 1] - elementStart - 1; if (arrayElements[index] == null) { arrayElements[index] = LazyFactory.createLazyObject(oi.getListElementObjectInspector()); } if (isNull(oi.getNullSequence(), bytes, elementStart, elementLength)) { arrayElements[index].setNull(); } else { arrayElements[index].init(bytes, elementStart, elementLength); } return arrayElements[index].getObject(); }
public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, LazyObjectInspectorParameters lazyParams) { ArrayList<Object> signature = new ArrayList<Object>(); signature.add(listElementObjectInspector); signature.add(Byte.valueOf(separator)); signature.add(lazyParams.getNullSequence().toString()); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); LazyListObjectInspector result = cachedLazySimpleListObjectInspector .get(signature); if (result == null) { result = new LazyListObjectInspector(listElementObjectInspector, separator, lazyParams); LazyListObjectInspector prev = cachedLazySimpleListObjectInspector.putIfAbsent(signature, result); if (prev != null) { result = prev; } } return result; }
parsed = true; byte separator = oi.getSeparator(); boolean isEscaped = oi.isEscaped(); byte escapeChar = oi.getEscapeChar();
/** * Get the element without checking out-of-bound index. */ private Object uncheckedGetElement(int index) { if (elementInited[index]) { return arrayElements[index].getObject(); } elementInited[index] = true; int elementStart = startPosition[index]; int elementLength = startPosition[index + 1] - elementStart - 1; if (arrayElements[index] == null) { arrayElements[index] = LazyFactory.createLazyObject(oi.getListElementObjectInspector()); } if (isNull(oi.getNullSequence(), bytes, elementStart, elementLength)) { arrayElements[index].setNull(); } else { arrayElements[index].init(bytes, elementStart, elementLength); } return arrayElements[index].getObject(); }
public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, LazyObjectInspectorParameters lazyParams) { ArrayList<Object> signature = new ArrayList<Object>(); signature.add(listElementObjectInspector); signature.add(Byte.valueOf(separator)); signature.add(lazyParams.getNullSequence().toString()); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); LazyListObjectInspector result = cachedLazySimpleListObjectInspector .get(signature); if (result == null) { result = new LazyListObjectInspector(listElementObjectInspector, separator, lazyParams); LazyListObjectInspector prev = cachedLazySimpleListObjectInspector.putIfAbsent(signature, result); if (prev != null) { result = prev; } } return result; }
parsed = true; byte separator = oi.getSeparator(); boolean isEscaped = oi.isEscaped(); byte escapeChar = oi.getEscapeChar();
/** * Get the element without checking out-of-bound index. */ private Object uncheckedGetElement(int index) { if (elementInited[index]) { return arrayElements[index].getObject(); } elementInited[index] = true; int elementStart = startPosition[index]; int elementLength = startPosition[index + 1] - elementStart - 1; if (arrayElements[index] == null) { arrayElements[index] = LazyFactory.createLazyObject(oi.getListElementObjectInspector()); } if (isNull(oi.getNullSequence(), bytes, elementStart, elementLength)) { arrayElements[index].setNull(); } else { arrayElements[index].init(bytes, elementStart, elementLength); } return arrayElements[index].getObject(); }
public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, LazyObjectInspectorParameters lazyParams) { ArrayList<Object> signature = new ArrayList<Object>(); signature.add(listElementObjectInspector); signature.add(Byte.valueOf(separator)); signature.add(lazyParams.getNullSequence().toString()); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); LazyListObjectInspector result = cachedLazySimpleListObjectInspector .get(signature); if (result == null) { result = new LazyListObjectInspector(listElementObjectInspector, separator, lazyParams); LazyListObjectInspector prev = cachedLazySimpleListObjectInspector.putIfAbsent(signature, result); if (prev != null) { result = prev; } } return result; }
parsed = true; byte separator = oi.getSeparator(); boolean isEscaped = oi.isEscaped(); byte escapeChar = oi.getEscapeChar();
public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, LazyObjectInspectorParameters lazyParams) { ArrayList<Object> signature = new ArrayList<Object>(); signature.add(listElementObjectInspector); signature.add(Byte.valueOf(separator)); signature.add(lazyParams.getNullSequence().toString()); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); LazyListObjectInspector result = cachedLazySimpleListObjectInspector .get(signature); if (result == null) { result = new LazyListObjectInspector(listElementObjectInspector, separator, lazyParams); LazyListObjectInspector prev = cachedLazySimpleListObjectInspector.putIfAbsent(signature, result); if (prev != null) { result = prev; } } return result; }