@Override public void init(ByteArrayRef bytes, int start, int length) { // re-use existing text member in varchar 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 varchar 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 varchar 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 varchar 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 varchar writable Text textValue = data.getTextValue(); textValue.set(bytes.getData(), start, length); data.enforceMaxLength(maxLength); }
@Override Object next(Object previous) throws IOException { final HiveVarcharWritable result; if (previous == null) { result = new HiveVarcharWritable(); } else { result = (HiveVarcharWritable) 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 varchar length result.enforceMaxLength(maxLength); return result; }
public void readHiveVarchar(ReadHiveVarcharResults readHiveVarcharResults) throws IOException { BinarySortableReadHiveVarcharResults binarySortableReadHiveVarcharResults = (BinarySortableReadHiveVarcharResults) readHiveVarcharResults; if (!binarySortableReadHiveVarcharResults.isInit()) { binarySortableReadHiveVarcharResults.init((VarcharTypeInfo) primitiveTypeInfos[fieldIndex]); } HiveVarcharWritable hiveVarcharWritable = binarySortableReadHiveVarcharResults.getHiveVarcharWritable(); // Decode the bytes into our Text buffer, then truncate. BinarySortableSerDe.deserializeText(inputByteBuffer, columnSortOrderIsDesc[fieldIndex], hiveVarcharWritable.getTextValue()); hiveVarcharWritable.enforceMaxLength(binarySortableReadHiveVarcharResults.getMaxLength()); readHiveVarcharResults.bytes = hiveVarcharWritable.getTextValue().getBytes(); readHiveVarcharResults.start = 0; readHiveVarcharResults.length = hiveVarcharWritable.getTextValue().getLength(); }
public void readHiveVarchar(ReadHiveVarcharResults readHiveVarcharResults) throws IOException { BinarySortableReadHiveVarcharResults binarySortableReadHiveVarcharResults = (BinarySortableReadHiveVarcharResults) readHiveVarcharResults; if (!binarySortableReadHiveVarcharResults.isInit()) { binarySortableReadHiveVarcharResults.init((VarcharTypeInfo) primitiveTypeInfos[fieldIndex]); } HiveVarcharWritable hiveVarcharWritable = binarySortableReadHiveVarcharResults.getHiveVarcharWritable(); // Decode the bytes into our Text buffer, then truncate. BinarySortableSerDe.deserializeText(inputByteBuffer, columnSortOrderIsDesc[fieldIndex], hiveVarcharWritable.getTextValue()); hiveVarcharWritable.enforceMaxLength(binarySortableReadHiveVarcharResults.getMaxLength()); readHiveVarcharResults.bytes = hiveVarcharWritable.getTextValue().getBytes(); readHiveVarcharResults.start = 0; readHiveVarcharResults.length = hiveVarcharWritable.getTextValue().getLength(); }
public void readHiveVarchar(ReadHiveVarcharResults readHiveVarcharResults) throws IOException { BinarySortableReadHiveVarcharResults binarySortableReadHiveVarcharResults = (BinarySortableReadHiveVarcharResults) readHiveVarcharResults; if (!binarySortableReadHiveVarcharResults.isInit()) { binarySortableReadHiveVarcharResults.init((VarcharTypeInfo) primitiveTypeInfos[fieldIndex]); } HiveVarcharWritable hiveVarcharWritable = binarySortableReadHiveVarcharResults.getHiveVarcharWritable(); // Decode the bytes into our Text buffer, then truncate. BinarySortableSerDe.deserializeText(inputByteBuffer, columnSortOrderIsDesc[fieldIndex], hiveVarcharWritable.getTextValue()); hiveVarcharWritable.enforceMaxLength(binarySortableReadHiveVarcharResults.getMaxLength()); readHiveVarcharResults.bytes = hiveVarcharWritable.getTextValue().getBytes(); readHiveVarcharResults.start = 0; readHiveVarcharResults.length = hiveVarcharWritable.getTextValue().getLength(); }
public void readHiveVarchar(ReadHiveVarcharResults readHiveVarcharResults) throws IOException { LazyBinaryReadHiveVarcharResults lazyBinaryReadHiveVarcharResults = (LazyBinaryReadHiveVarcharResults) readHiveVarcharResults; if (!lazyBinaryReadHiveVarcharResults.isInit()) { lazyBinaryReadHiveVarcharResults.init((VarcharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (lazyBinaryReadHiveVarcharResults.readStringResults == null) { lazyBinaryReadHiveVarcharResults.readStringResults = new LazyBinaryReadStringResults(); } LazyBinaryReadStringResults readStringResults = lazyBinaryReadHiveVarcharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveVarcharWritable hiveVarcharWritable = lazyBinaryReadHiveVarcharResults.getHiveVarcharWritable(); hiveVarcharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveVarcharWritable.enforceMaxLength(lazyBinaryReadHiveVarcharResults.getMaxLength()); readHiveVarcharResults.bytes = hiveVarcharWritable.getTextValue().getBytes(); readHiveVarcharResults.start = 0; readHiveVarcharResults.length = hiveVarcharWritable.getTextValue().getLength(); }
public void readHiveVarchar(ReadHiveVarcharResults readHiveVarcharResults) throws IOException { LazyBinaryReadHiveVarcharResults lazyBinaryReadHiveVarcharResults = (LazyBinaryReadHiveVarcharResults) readHiveVarcharResults; if (!lazyBinaryReadHiveVarcharResults.isInit()) { lazyBinaryReadHiveVarcharResults.init((VarcharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (lazyBinaryReadHiveVarcharResults.readStringResults == null) { lazyBinaryReadHiveVarcharResults.readStringResults = new LazyBinaryReadStringResults(); } LazyBinaryReadStringResults readStringResults = lazyBinaryReadHiveVarcharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveVarcharWritable hiveVarcharWritable = lazyBinaryReadHiveVarcharResults.getHiveVarcharWritable(); hiveVarcharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveVarcharWritable.enforceMaxLength(lazyBinaryReadHiveVarcharResults.getMaxLength()); readHiveVarcharResults.bytes = hiveVarcharWritable.getTextValue().getBytes(); readHiveVarcharResults.start = 0; readHiveVarcharResults.length = hiveVarcharWritable.getTextValue().getLength(); }
public void readHiveVarchar(ReadHiveVarcharResults readHiveVarcharResults) throws IOException { LazyBinaryReadHiveVarcharResults lazyBinaryReadHiveVarcharResults = (LazyBinaryReadHiveVarcharResults) readHiveVarcharResults; if (!lazyBinaryReadHiveVarcharResults.isInit()) { lazyBinaryReadHiveVarcharResults.init((VarcharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (lazyBinaryReadHiveVarcharResults.readStringResults == null) { lazyBinaryReadHiveVarcharResults.readStringResults = new LazyBinaryReadStringResults(); } LazyBinaryReadStringResults readStringResults = lazyBinaryReadHiveVarcharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveVarcharWritable hiveVarcharWritable = lazyBinaryReadHiveVarcharResults.getHiveVarcharWritable(); hiveVarcharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveVarcharWritable.enforceMaxLength(lazyBinaryReadHiveVarcharResults.getMaxLength()); readHiveVarcharResults.bytes = hiveVarcharWritable.getTextValue().getBytes(); readHiveVarcharResults.start = 0; readHiveVarcharResults.length = hiveVarcharWritable.getTextValue().getLength(); }
public void readHiveVarchar(ReadHiveVarcharResults readHiveVarcharResults) throws IOException { LazySimpleReadHiveVarcharResults lazySimpleReadHiveVarvarcharResults = (LazySimpleReadHiveVarcharResults) readHiveVarcharResults; if (!lazySimpleReadHiveVarvarcharResults.isInit()) { lazySimpleReadHiveVarvarcharResults.init((VarcharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (lazySimpleReadHiveVarvarcharResults.readStringResults == null) { lazySimpleReadHiveVarvarcharResults.readStringResults = new LazySimpleReadStringResults(); } LazySimpleReadStringResults readStringResults = lazySimpleReadHiveVarvarcharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveVarcharWritable hiveVarcharWritable = lazySimpleReadHiveVarvarcharResults.getHiveVarcharWritable(); hiveVarcharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveVarcharWritable.enforceMaxLength(lazySimpleReadHiveVarvarcharResults.getMaxLength()); readHiveVarcharResults.bytes = hiveVarcharWritable.getTextValue().getBytes(); readHiveVarcharResults.start = 0; readHiveVarcharResults.length = hiveVarcharWritable.getTextValue().getLength(); }
public void readHiveVarchar(ReadHiveVarcharResults readHiveVarcharResults) throws IOException { LazySimpleReadHiveVarcharResults lazySimpleReadHiveVarvarcharResults = (LazySimpleReadHiveVarcharResults) readHiveVarcharResults; if (!lazySimpleReadHiveVarvarcharResults.isInit()) { lazySimpleReadHiveVarvarcharResults.init((VarcharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (lazySimpleReadHiveVarvarcharResults.readStringResults == null) { lazySimpleReadHiveVarvarcharResults.readStringResults = new LazySimpleReadStringResults(); } LazySimpleReadStringResults readStringResults = lazySimpleReadHiveVarvarcharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveVarcharWritable hiveVarcharWritable = lazySimpleReadHiveVarvarcharResults.getHiveVarcharWritable(); hiveVarcharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveVarcharWritable.enforceMaxLength(lazySimpleReadHiveVarvarcharResults.getMaxLength()); readHiveVarcharResults.bytes = hiveVarcharWritable.getTextValue().getBytes(); readHiveVarcharResults.start = 0; readHiveVarcharResults.length = hiveVarcharWritable.getTextValue().getLength(); }
public void readHiveVarchar(ReadHiveVarcharResults readHiveVarcharResults) throws IOException { LazySimpleReadHiveVarcharResults lazySimpleReadHiveVarvarcharResults = (LazySimpleReadHiveVarcharResults) readHiveVarcharResults; if (!lazySimpleReadHiveVarvarcharResults.isInit()) { lazySimpleReadHiveVarvarcharResults.init((VarcharTypeInfo) primitiveTypeInfos[fieldIndex]); } if (lazySimpleReadHiveVarvarcharResults.readStringResults == null) { lazySimpleReadHiveVarvarcharResults.readStringResults = new LazySimpleReadStringResults(); } LazySimpleReadStringResults readStringResults = lazySimpleReadHiveVarvarcharResults.readStringResults; // Read the bytes using our basic method. readString(readStringResults); // Copy the bytes into our Text object, then truncate. HiveVarcharWritable hiveVarcharWritable = lazySimpleReadHiveVarvarcharResults.getHiveVarcharWritable(); hiveVarcharWritable.getTextValue().set(readStringResults.bytes, readStringResults.start, readStringResults.length); hiveVarcharWritable.enforceMaxLength(lazySimpleReadHiveVarvarcharResults.getMaxLength()); readHiveVarcharResults.bytes = hiveVarcharWritable.getTextValue().getBytes(); readHiveVarcharResults.start = 0; readHiveVarcharResults.length = hiveVarcharWritable.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;