@Override public void init(ByteArrayRef bytes, int start, int length) { // re-use existing text member in char writable Text textValue = data.getTextValue(); textValue.set(bytes.getData(), start, length); data.enforceMaxLength(maxLength); }
r.enforceMaxLength(getCharacterMaxLength(type)); return r;
@Override public void init(ByteArrayRef bytes, int start, int length) { // re-use existing text member in char writable Text textValue = data.getTextValue(); textValue.set(bytes.getData(), start, length); data.enforceMaxLength(maxLength); }
@Override public void init(ByteArrayRef bytes, int start, int length) { // re-use existing text member in char writable Text textValue = data.getTextValue(); textValue.set(bytes.getData(), start, length); data.enforceMaxLength(maxLength); }
@Override public void init(ByteArrayRef bytes, int start, int length) { // re-use existing text member in char writable Text textValue = data.getTextValue(); textValue.set(bytes.getData(), start, length); data.enforceMaxLength(maxLength); }
@Override public void init(ByteArrayRef bytes, int start, int length) { // re-use existing text member in char writable Text textValue = data.getTextValue(); textValue.set(bytes.getData(), start, length); data.enforceMaxLength(maxLength); }
@Override Object next(Object previous) throws IOException { final HiveCharWritable result; if (previous == null) { result = new HiveCharWritable(); } else { result = (HiveCharWritable) previous; } // Use the string reader implementation to populate the internal Text value Object textVal = super.next(result.getTextValue()); if (textVal == null) { return null; } // result should now hold the value that was read in. // enforce char length result.enforceMaxLength(maxLength); return result; }
public void readHiveChar(ReadHiveCharResults readHiveCharResults) throws IOException { BinarySortableReadHiveCharResults binarySortableReadHiveCharResults = (BinarySortableReadHiveCharResults) readHiveCharResults; if (!binarySortableReadHiveCharResults.isInit()) { binarySortableReadHiveCharResults.init((CharTypeInfo) primitiveTypeInfos[fieldIndex]); } HiveCharWritable hiveCharWritable = binarySortableReadHiveCharResults.getHiveCharWritable(); // Decode the bytes into our Text buffer, then truncate. BinarySortableSerDe.deserializeText(inputByteBuffer, columnSortOrderIsDesc[fieldIndex], hiveCharWritable.getTextValue()); hiveCharWritable.enforceMaxLength(binarySortableReadHiveCharResults.getMaxLength()); readHiveCharResults.bytes = hiveCharWritable.getTextValue().getBytes(); readHiveCharResults.start = 0; readHiveCharResults.length = hiveCharWritable.getTextValue().getLength(); }
public void readHiveChar(ReadHiveCharResults readHiveCharResults) throws IOException { BinarySortableReadHiveCharResults binarySortableReadHiveCharResults = (BinarySortableReadHiveCharResults) readHiveCharResults; if (!binarySortableReadHiveCharResults.isInit()) { binarySortableReadHiveCharResults.init((CharTypeInfo) primitiveTypeInfos[fieldIndex]); } HiveCharWritable hiveCharWritable = binarySortableReadHiveCharResults.getHiveCharWritable(); // Decode the bytes into our Text buffer, then truncate. BinarySortableSerDe.deserializeText(inputByteBuffer, columnSortOrderIsDesc[fieldIndex], hiveCharWritable.getTextValue()); hiveCharWritable.enforceMaxLength(binarySortableReadHiveCharResults.getMaxLength()); readHiveCharResults.bytes = hiveCharWritable.getTextValue().getBytes(); readHiveCharResults.start = 0; readHiveCharResults.length = hiveCharWritable.getTextValue().getLength(); }
public void readHiveChar(ReadHiveCharResults readHiveCharResults) throws IOException { BinarySortableReadHiveCharResults binarySortableReadHiveCharResults = (BinarySortableReadHiveCharResults) readHiveCharResults; if (!binarySortableReadHiveCharResults.isInit()) { binarySortableReadHiveCharResults.init((CharTypeInfo) primitiveTypeInfos[fieldIndex]); } HiveCharWritable hiveCharWritable = binarySortableReadHiveCharResults.getHiveCharWritable(); // Decode the bytes into our Text buffer, then truncate. BinarySortableSerDe.deserializeText(inputByteBuffer, columnSortOrderIsDesc[fieldIndex], hiveCharWritable.getTextValue()); hiveCharWritable.enforceMaxLength(binarySortableReadHiveCharResults.getMaxLength()); readHiveCharResults.bytes = hiveCharWritable.getTextValue().getBytes(); readHiveCharResults.start = 0; readHiveCharResults.length = hiveCharWritable.getTextValue().getLength(); }
public void readHiveChar(ReadHiveCharResults readHiveCharResults) throws IOException { LazyBinaryReadHiveCharResults lazyBinaryReadHiveCharResults = (LazyBinaryReadHiveCharResults) readHiveCharResults; if (!lazyBinaryReadHiveCharResults.isInit()) { lazyBinaryReadHiveCharResults.init((CharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (lazyBinaryReadHiveCharResults.readStringResults == null) { lazyBinaryReadHiveCharResults.readStringResults = new LazyBinaryReadStringResults(); } LazyBinaryReadStringResults readStringResults = lazyBinaryReadHiveCharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveCharWritable hiveCharWritable = lazyBinaryReadHiveCharResults.getHiveCharWritable(); hiveCharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveCharWritable.enforceMaxLength(lazyBinaryReadHiveCharResults.getMaxLength()); readHiveCharResults.bytes = hiveCharWritable.getTextValue().getBytes(); readHiveCharResults.start = 0; readHiveCharResults.length = hiveCharWritable.getTextValue().getLength(); }
public void readHiveChar(ReadHiveCharResults readHiveCharResults) throws IOException { LazyBinaryReadHiveCharResults lazyBinaryReadHiveCharResults = (LazyBinaryReadHiveCharResults) readHiveCharResults; if (!lazyBinaryReadHiveCharResults.isInit()) { lazyBinaryReadHiveCharResults.init((CharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (lazyBinaryReadHiveCharResults.readStringResults == null) { lazyBinaryReadHiveCharResults.readStringResults = new LazyBinaryReadStringResults(); } LazyBinaryReadStringResults readStringResults = lazyBinaryReadHiveCharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveCharWritable hiveCharWritable = lazyBinaryReadHiveCharResults.getHiveCharWritable(); hiveCharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveCharWritable.enforceMaxLength(lazyBinaryReadHiveCharResults.getMaxLength()); readHiveCharResults.bytes = hiveCharWritable.getTextValue().getBytes(); readHiveCharResults.start = 0; readHiveCharResults.length = hiveCharWritable.getTextValue().getLength(); }
public void readHiveChar(ReadHiveCharResults readHiveCharResults) throws IOException { LazySimpleReadHiveCharResults LazySimpleReadHiveCharResults = (LazySimpleReadHiveCharResults) readHiveCharResults; if (!LazySimpleReadHiveCharResults.isInit()) { LazySimpleReadHiveCharResults.init((CharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (LazySimpleReadHiveCharResults.readStringResults == null) { LazySimpleReadHiveCharResults.readStringResults = new LazySimpleReadStringResults(); } LazySimpleReadStringResults readStringResults = LazySimpleReadHiveCharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveCharWritable hiveCharWritable = LazySimpleReadHiveCharResults.getHiveCharWritable(); hiveCharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveCharWritable.enforceMaxLength(LazySimpleReadHiveCharResults.getMaxLength()); readHiveCharResults.bytes = hiveCharWritable.getTextValue().getBytes(); readHiveCharResults.start = 0; readHiveCharResults.length = hiveCharWritable.getTextValue().getLength(); }
public void readHiveChar(ReadHiveCharResults readHiveCharResults) throws IOException { LazySimpleReadHiveCharResults LazySimpleReadHiveCharResults = (LazySimpleReadHiveCharResults) readHiveCharResults; if (!LazySimpleReadHiveCharResults.isInit()) { LazySimpleReadHiveCharResults.init((CharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (LazySimpleReadHiveCharResults.readStringResults == null) { LazySimpleReadHiveCharResults.readStringResults = new LazySimpleReadStringResults(); } LazySimpleReadStringResults readStringResults = LazySimpleReadHiveCharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveCharWritable hiveCharWritable = LazySimpleReadHiveCharResults.getHiveCharWritable(); hiveCharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveCharWritable.enforceMaxLength(LazySimpleReadHiveCharResults.getMaxLength()); readHiveCharResults.bytes = hiveCharWritable.getTextValue().getBytes(); readHiveCharResults.start = 0; readHiveCharResults.length = hiveCharWritable.getTextValue().getLength(); }
public void readHiveChar(ReadHiveCharResults readHiveCharResults) throws IOException { LazyBinaryReadHiveCharResults lazyBinaryReadHiveCharResults = (LazyBinaryReadHiveCharResults) readHiveCharResults; if (!lazyBinaryReadHiveCharResults.isInit()) { lazyBinaryReadHiveCharResults.init((CharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (lazyBinaryReadHiveCharResults.readStringResults == null) { lazyBinaryReadHiveCharResults.readStringResults = new LazyBinaryReadStringResults(); } LazyBinaryReadStringResults readStringResults = lazyBinaryReadHiveCharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveCharWritable hiveCharWritable = lazyBinaryReadHiveCharResults.getHiveCharWritable(); hiveCharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveCharWritable.enforceMaxLength(lazyBinaryReadHiveCharResults.getMaxLength()); readHiveCharResults.bytes = hiveCharWritable.getTextValue().getBytes(); readHiveCharResults.start = 0; readHiveCharResults.length = hiveCharWritable.getTextValue().getLength(); }
public void readHiveChar(ReadHiveCharResults readHiveCharResults) throws IOException { LazySimpleReadHiveCharResults LazySimpleReadHiveCharResults = (LazySimpleReadHiveCharResults) readHiveCharResults; if (!LazySimpleReadHiveCharResults.isInit()) { LazySimpleReadHiveCharResults.init((CharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (LazySimpleReadHiveCharResults.readStringResults == null) { LazySimpleReadHiveCharResults.readStringResults = new LazySimpleReadStringResults(); } LazySimpleReadStringResults readStringResults = LazySimpleReadHiveCharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveCharWritable hiveCharWritable = LazySimpleReadHiveCharResults.getHiveCharWritable(); hiveCharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveCharWritable.enforceMaxLength(LazySimpleReadHiveCharResults.getMaxLength()); readHiveCharResults.bytes = hiveCharWritable.getTextValue().getBytes(); readHiveCharResults.start = 0; readHiveCharResults.length = hiveCharWritable.getTextValue().getLength(); }
r.enforceMaxLength(getCharacterMaxLength(type)); return r;
r.enforceMaxLength(getCharacterMaxLength(type)); return r;
r.enforceMaxLength(getCharacterMaxLength(type)); return r;
r.enforceMaxLength(getCharacterMaxLength(type)); return r;