@Override public int toBytes(Object object, byte[] bytes, int offset) { if (object == null) { throw newIllegalDataException(this + " may not be null"); } return this.getCodec().encodeByte(((Number) object).byteValue(), bytes, offset); }
@Override public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression child = children.get(0); if (!child.evaluate(tuple, ptr)) { return false; } if (ptr.getLength() == 0) { return true; } int code = PTinyint.INSTANCE.getCodec().decodeByte(ptr, child.getSortOrder()); TransactionFactory.Provider provider = TransactionFactory.Provider.fromCode(code); ptr.set(PVarchar.INSTANCE.toBytes(provider.name())); return true; }
@Override public int toBytes(Object object, byte[] bytes, int offset) { if (object == null) { throw newIllegalDataException(this + " may not be null"); } return this.getCodec().encodeByte(((Number) object).byteValue(), bytes, offset); }
@Override public int toBytes(Object object, byte[] bytes, int offset) { if (object == null) { throw newIllegalDataException(this + " may not be null"); } return this.getCodec().encodeByte(((Number) object).byteValue(), bytes, offset); }
PTinyint.INSTANCE.getCodec().decodeByte( transactionProviderKv.getValueArray(), transactionProviderKv.getValueOffset(),
@Override public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression child = children.get(0); if (!child.evaluate(tuple, ptr)) { return false; } if (ptr.getLength() == 0) { return true; } int code = PTinyint.INSTANCE.getCodec().decodeByte(ptr, child.getSortOrder()); TransactionFactory.Provider provider = TransactionFactory.Provider.fromCode(code); ptr.set(PVarchar.INSTANCE.toBytes(provider.name())); return true; }
@Override public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression child = children.get(0); if (!child.evaluate(tuple, ptr)) { return false; } if (ptr.getLength() == 0) { return true; } int code = PTinyint.INSTANCE.getCodec().decodeByte(ptr, child.getSortOrder()); TransactionFactory.Provider provider = TransactionFactory.Provider.fromCode(code); ptr.set(PVarchar.INSTANCE.toBytes(provider.name())); return true; }
PTinyint.INSTANCE.getCodec().decodeByte( transactionProviderKv.getValueArray(), transactionProviderKv.getValueOffset(),
PTinyint.INSTANCE.getCodec().decodeByte( transactionProviderKv.getValueArray(), transactionProviderKv.getValueOffset(),