setMode(other.getMode()); if (other.hasWidth()) { setWidth(other.getWidth());
public void writeTo(io.protostuff.Output output, com.dremio.common.types.TypeProtos.MajorType message) throws java.io.IOException { if(message.hasMinorType()) output.writeEnum(1, message.getMinorType().getNumber(), false); if(message.hasMode()) output.writeEnum(2, message.getMode().getNumber(), false); if(message.hasWidth()) output.writeInt32(3, message.getWidth(), false); if(message.hasPrecision()) output.writeInt32(4, message.getPrecision(), false); if(message.hasScale()) output.writeInt32(5, message.getScale(), false); if(message.hasTimeZone()) output.writeInt32(6, message.getTimeZone(), false); for(com.dremio.common.types.TypeProtos.MinorType subType : message.getSubTypeList()) output.writeEnum(7, subType.getNumber(), true); } public boolean isInitialized(com.dremio.common.types.TypeProtos.MajorType message)
public static MajorTypeHolder get(MajorType mt) { MajorTypeHolder h = new MajorTypeHolder(); h.minorType = mt.getMinorType(); h.mode = mt.getMode(); if (mt.hasPrecision()) { h.precision = mt.getPrecision(); } if (mt.hasScale()) { h.scale = mt.getScale(); } if (mt.hasWidth()) { h.width = mt.getWidth(); } return h; } }