public static ConstantExpression createInt32Constant(int i) { return new ConstantExpression(new AsterixConstantValue(new AInt32(i))); }
@Override public boolean equals(Object obj) { if (!(obj instanceof AInt32)) { return false; } else { return value == (((AInt32) obj).getIntegerValue()); } }
@Override public boolean deepEqual(IAObject obj) { return equals(obj); }
break; case INTEGER: num = ((AInt32) sourceObject).getIntegerValue(); break; case BIGINT: return new AInt16((short) num); case INTEGER: return new AInt32((int) num); case BIGINT: return new AInt64(num);
DataOutput dos1 = abvs1.getDataOutput(); try { AInt32 ai = new AInt32(dimension); SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(ai.getType()).serialize(ai, dos1); } catch (HyracksDataException e) { throw new AlgebricksException(e); DataOutput dos2 = abvs2.getDataOutput(); try { AInt32 ai = new AInt32(i); SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(ai.getType()).serialize(ai, dos2); } catch (HyracksDataException e) { throw new AlgebricksException(e);
@Override public int hash() { return hashCode(); }
AInt32 aInt = new AInt32(0); try { aInt = (AInt32) ATypeHierarchy.convertNumericTypeObject(constVal.getObject(), ATypeTag.INTEGER); edThresh = aInt; } else if (normFuncIdent == AlgebricksBuiltinFunctions.LT) { int ed = aInt.getIntegerValue() - 1; if (ed < 0) ed = 0; edThresh = new AInt32(ed); } else { return null;
@Override public AInt32 next() { return new AInt32(counter++); }
public static Integer getIntConstant(ILogicalExpression expr) { final IAObject iaObject = getConstantIaObject(expr, ATypeTag.INTEGER); return iaObject != null ? ((AInt32) iaObject).getIntegerValue() : null; }
DataOutput dos = abvs.getDataOutput(); try { AInt32 ai = new AInt32(i); SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(ai.getType()).serialize(ai, dos); } catch (HyracksDataException e) { new MutableObject<>(new ConstantExpression(new AsterixConstantValue(new AInt32(i))))); partitionFun.setSourceLocation(sourceLoc); return new Triple<>(evalFactory, partitionFun, recType.getFieldTypes()[i]);
@Override public AInt32 deserialize(DataInput in) throws HyracksDataException { return new AInt32(IntegerSerializerDeserializer.read(in)); }
@Override public void serialize(AInt32 instance, DataOutput out) throws HyracksDataException { IntegerSerializerDeserializer.write(instance.getIntegerValue(), out); }
protected void writeVarList(List<LogicalVariable> varList, List<Mutable<ILogicalExpression>> funcArgs) { Mutable<ILogicalExpression> numKeysRef = new MutableObject<>(new ConstantExpression(new AsterixConstantValue(new AInt32(varList.size())))); funcArgs.add(numKeysRef); for (LogicalVariable keyVar : varList) { VariableReferenceExpression keyVarRef = new VariableReferenceExpression(keyVar); funcArgs.add(new MutableObject<>(keyVarRef)); } }
return null; int topK = ((AInt32) maxObjectsValue).getIntegerValue(); if (topK < 0) { topK = 0; return null; int offset = ((AInt32) offsetValue).getIntegerValue(); if (offset < 0) { offset = 0;
@Override public IAObject convertType(IAObject sourceObject, TypeCastingMathFunctionType mathFunction) throws HyracksDataException { float sourceValue = ATypeHierarchy.applyMathFunctionToFloatValue(sourceObject, mathFunction); int targetValue = convert(sourceValue); return new AInt32(targetValue); }
@Override public Dataverse getMetadataEntityFromTuple(ITupleReference frameTuple) throws HyracksDataException { byte[] serRecord = frameTuple.getFieldData(DATAVERSE_PAYLOAD_TUPLE_FIELD_INDEX); int recordStartOffset = frameTuple.getFieldStart(DATAVERSE_PAYLOAD_TUPLE_FIELD_INDEX); int recordLength = frameTuple.getFieldLength(DATAVERSE_PAYLOAD_TUPLE_FIELD_INDEX); ByteArrayInputStream stream = new ByteArrayInputStream(serRecord, recordStartOffset, recordLength); DataInput in = new DataInputStream(stream); ARecord dataverseRecord = recordSerDes.deserialize(in); return new Dataverse(((AString) dataverseRecord.getValueByPos(0)).getStringValue(), ((AString) dataverseRecord.getValueByPos(1)).getStringValue(), ((AInt32) dataverseRecord.getValueByPos(3)).getIntegerValue()); }
private static void writeVarList(List<LogicalVariable> varList, List<Mutable<ILogicalExpression>> funcArgs) { Mutable<ILogicalExpression> numKeysRef = new MutableObject<>(new ConstantExpression(new AsterixConstantValue(new AInt32(varList.size())))); funcArgs.add(numKeysRef); for (LogicalVariable keyVar : varList) { Mutable<ILogicalExpression> keyVarRef = new MutableObject<>(new VariableReferenceExpression(keyVar)); funcArgs.add(keyVarRef); } }
@Override public RecordId read(int index) throws HyracksDataException { if (super.read(index) == null) { return null; } // Get row number bbis.setByteBuffer(frameBuffer, tupleStartOffset + tupleAccessor.getFieldStartOffset(index, ridFields[IndexingConstants.ROW_NUMBER_FIELD_INDEX])); rid.setRow( ((AInt32) inRecDesc.getFields()[ridFields[IndexingConstants.ROW_NUMBER_FIELD_INDEX]].deserialize(dis)) .getIntegerValue()); return rid; } }
@Override public IAObject convertType(IAObject sourceObject, TypeCastingMathFunctionType mathFunction) throws HyracksDataException { double sourceValue = ATypeHierarchy.applyMathFunctionToDoubleValue(sourceObject, mathFunction); int targetValue = convert(sourceValue); return new AInt32(targetValue); }