public NullableBitsHyperVectorStateReader(VectorAccessor nullableAccessor) { super(Types.required(MinorType.UINT1)); this.nullableAccessor = nullableAccessor; }
public ListBitsHyperVectorStateReader(VectorAccessor listAccessor) { super(Types.required(MinorType.UINT1)); this.listAccessor = listAccessor; }
@Override public MajorType getType() { return Types.required(MinorType.MAP); }
public ArrayOffsetHyperVectorAccessor(VectorAccessor va) { super(Types.required(MinorType.UINT4)); repeatedVectorAccessor = va; }
public VarWidthOffsetHyperVectorAccessor(VectorAccessor va) { super(Types.required(MinorType.UINT4)); varWidthVectorAccessor = va; }
public UnionTypeHyperVectorAccessor(VectorAccessor va) { super(Types.required(MinorType.UINT1)); unionVectorAccessor = va; }
FloatStubAccessor( float value ) { super( Types.required( MinorType.FLOAT4 ), value ); }
SmallIntStubAccessor( short value ) { super( Types.required( MinorType.SMALLINT ), value ); }
DoubleStubAccessor( double value ) { super( Types.required( MinorType.FLOAT8 ), value ); }
TinyIntStubAccessor( byte value ) { super( Types.required( MinorType.TINYINT ), value ); }
IntegerStubAccessor( int value ) { super( Types.required( MinorType.INT ), value ); }
BigIntStubAccessor( long value ) { super( Types.required( MinorType.BIGINT ), value ); }
Types.required(TypeProtos.MinorType.VARCHAR).toBuilder().setWidth( getOriginalScanRel().getCluster().getTypeFactory().createSqlType(SqlTypeName.VARCHAR).getPrecision()).build(); case "LONG": case "BIGINT": return Types.required(TypeProtos.MinorType.BIGINT); case "INT": case "INTEGER": return Types.required(TypeProtos.MinorType.INT); case "FLOAT": return Types.required(TypeProtos.MinorType.FLOAT4); case "DOUBLE": return Types.required(TypeProtos.MinorType.FLOAT8); case "INTERVAL_YEAR_MONTH": return Types.required(TypeProtos.MinorType.INTERVALYEAR); case "INTERVAL_DAY_TIME": return Types.required(TypeProtos.MinorType.INTERVALDAY); case "BOOLEAN": return Types.required(TypeProtos.MinorType.BIT); case "BINARY": return Types.required(TypeProtos.MinorType.VARBINARY).toBuilder().build(); case "ANY": case "DECIMAL": return null; default: return Types.required(TypeProtos.MinorType.valueOf(typeStr));
@Override public MajorType getOutputType(List<LogicalExpression> expressions) { for(LogicalExpression e : expressions){ if(e.getMajorType().getMode() == DataMode.OPTIONAL){ return Types.optional(outputMinorType); } } return Types.required(outputMinorType); } }
public final BooleanTypeContext booleanType() throws RecognitionException { BooleanTypeContext _localctx = new BooleanTypeContext(_ctx, getState()); enterRule(_localctx, 14, RULE_booleanType); try { enterOuterAlt(_localctx, 1); { setState(128); match(BIT); ((BooleanTypeContext)_localctx).type = Types.required(TypeProtos.MinorType.BIT); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; }
@Override public MapWriter rootAsMap() { switch(mode){ case INIT: MapVector map = container.addOrGet(name, Types.required(MinorType.MAP), MapVector.class); mapRoot = new SingleMapWriter(map, this, unionEnabled); mapRoot.setPosition(idx()); mode = Mode.MAP; break; case MAP: break; default: check(Mode.INIT, Mode.MAP); } return mapRoot; }
public UnionVector(MaterializedField field, BufferAllocator allocator, CallBack callBack) { // The metadata may start off listing subtypes for which vectors // do not actually exist. It appears that the semantics are to list // the subtypes that *could* appear. For example, in a sort we may // have two types: one batch has type A, the other type B, but the // batches must list both A and B as subtypes. this.field = field.clone(); this.allocator = allocator; this.internalMap = new MapVector(INTERNAL_MAP_NAME, allocator, callBack); this.typeVector = internalMap.addOrGet(TYPE_VECTOR_NAME, Types.required(MinorType.UINT1), UInt1Vector.class); this.field.addChild(internalMap.getField().clone()); this.callBack = callBack; }
((DateTypeContext)_localctx).type = Types.required(TypeProtos.MinorType.DATE); ((DateTypeContext)_localctx).type = Types.required(TypeProtos.MinorType.TIMESTAMP); ((DateTypeContext)_localctx).type = Types.required(TypeProtos.MinorType.TIME); ((DateTypeContext)_localctx).type = Types.required(TypeProtos.MinorType.TIMESTAMPTZ); ((DateTypeContext)_localctx).type = Types.required(TypeProtos.MinorType.INTERVAL); ((DateTypeContext)_localctx).type = Types.required(TypeProtos.MinorType.INTERVALYEAR); ((DateTypeContext)_localctx).type = Types.required(TypeProtos.MinorType.INTERVALDAY);
public ListVector(MaterializedField field, BufferAllocator allocator, CallBack callBack) { super(field, allocator); // Can't do this. See below. // super(field.cloneEmpty(), allocator); this.bits = new UInt1Vector(MaterializedField.create(BITS_VECTOR_NAME, Types.required(MinorType.UINT1)), allocator); this.field.addChild(getDataVector().getField()); this.writer = new UnionListWriter(this); this.reader = new UnionListReader(this); // // // To be consistent with the map vector, create the child if a child is // // given in the field. This is a mess. See DRILL-6046. // But, can't do this because the deserialization mechanism passes in a // field with children filled in, but with no expectation that the vector will // match its schema until this vector itself is loaded. Indeed a mess. // // assert field.getChildren().size() <= 1; // for (MaterializedField child : field.getChildren()) { // if (child.getName().equals(DATA_VECTOR_NAME)) { // continue; // } // setChildVector(BasicTypeHelper.getNewVector(child, allocator, callBack)); // } }
majorType = Types.optional(minorType); } else { majorType = Types.required(minorType);