Examples of LazyBinaryUnionObjectInspector


Examples of org.apache.hadoop.hive.serde2.lazybinary.objectinspector.LazyBinaryUnionObjectInspector

    /**
     * Parse the byte[] and fill fieldStart, fieldLength, fieldInited and
     * fieldIsNull.
     */
    private void parse() {
      LazyBinaryUnionObjectInspector uoi = (LazyBinaryUnionObjectInspector) oi;

      /**
       * Please note that tag is followed by field
       */
      int unionByteEnd = start + length;
      byte[] byteArr = this.bytes.getData();

      //Tag of union field is the first byte to be parsed
      final int tagEnd = start + 1;
      tag = byteArr[start];
      field = LazyBinaryFactory.createLazyBinaryObject(uoi.getObjectInspectors().get(tag));
      //Check the union field's length and offset
      LazyBinaryUtils.checkObjectByteInfo(uoi.getObjectInspectors().get(tag), byteArr, tagEnd, recordInfo, vInt);
      fieldStart = tagEnd + recordInfo.elementOffset;
      // Add 1 for tag
      fieldLength = recordInfo.elementSize;

      // Extra bytes at the end?
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.