public FieldAccessByIndexEvalFactory(IScalarEvaluatorFactory recordEvalFactory, IScalarEvaluatorFactory fieldIndexEvalFactory, ARecordType recordType, SourceLocation sourceLoc) { this.recordEvalFactory = recordEvalFactory; this.fieldIndexEvalFactory = fieldIndexEvalFactory; this.recordType = recordType; this.nullBitmapSize = RecordUtil.computeNullBitmapSize(recordType); this.sourceLoc = sourceLoc; }
public static IBinaryComparatorFactory getTokenBinaryComparatorFactory(IAType keyType) throws AlgebricksException { IAType type = getTokenType(keyType); // Ignore case for string types. return BinaryComparatorFactoryProvider.INSTANCE.getBinaryComparatorFactory(type, true, true); }
public static String getStringArgument(ILogicalExpression expr, int index) { return expr.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL ? getStringArgument((AbstractFunctionCallExpression) expr, index) : null; } }
public static Pair<IAType, Boolean> getNonNullableType(IAType keyType) { boolean nullable = false; IAType actualKeyType = keyType; if (NonTaggedFormatUtil.isOptional(keyType)) { actualKeyType = ((AUnionType) keyType).getActualType(); nullable = true; } return new Pair<>(actualKeyType, nullable); }
public static String getStringConstant(Mutable<ILogicalExpression> expr) { return ConstantExpressionUtil.getStringConstant(expr.getValue()); }
public static Long getLongConstant(ILogicalExpression expr) { final IAObject iaObject = getConstantIaObject(expr, ATypeTag.BIGINT); return iaObject != null ? ((AInt64) iaObject).getLongValue() : null; }
public int getItemLength(int itemOffset) throws HyracksDataException { ATypeTag itemType = getItemType(itemOffset); return NonTaggedFormatUtil.getFieldValueLength(listBytes, itemOffset, itemType, itemsAreSelfDescribing()); }
public static Integer getIntArgument(ILogicalExpression expr, int index) { return expr.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL ? getIntArgument((AbstractFunctionCallExpression) expr, index) : null; }
public static int getInt32Constant(Mutable<ILogicalExpression> expr) { return ConstantExpressionUtil.getIntConstant(expr.getValue()); }
public boolean isFixedType(AbstractCollectionType inputType) { return NonTaggedFormatUtil.isFixedSizedCollection(inputType.getItemType()); }
public static boolean getBooleanConstant(Mutable<ILogicalExpression> expr) { return ConstantExpressionUtil.getBooleanConstant(expr.getValue()); }
public static long getInt64Constant(Mutable<ILogicalExpression> expr) { return ConstantExpressionUtil.getLongConstant(expr.getValue()); }
private static AdmArrayNode getOpenFieldAsArray(AListPointable listPointable, int i) throws IOException { AListPointable pointable = AListPointable.FACTORY.createPointable(); int offset = listPointable.getItemOffset(AOrderedListType.FULL_OPEN_ORDEREDLIST_TYPE, i); int len = listPointable.getItemSize(AOrderedListType.FULL_OPEN_ORDEREDLIST_TYPE, i); pointable.set(listPointable.getByteArray(), offset, len); return getAsAdmNode(pointable); } }
public static Integer getIntConstant(ILogicalExpression expr) { final IAObject iaObject = getConstantIaObject(expr, ATypeTag.INTEGER); return iaObject != null ? ((AInt32) iaObject).getIntegerValue() : null; }
public int getNullBitmapSize(ARecordType recordType) { return RecordUtil.computeNullBitmapSize(recordType); }
public static ITypeTraits getTokenTypeTrait(IAType keyType) throws AlgebricksException { IAType type = getTokenType(keyType); return TypeTraitProvider.INSTANCE.getTypeTrait(type); } }
public int getClosedFieldSize(ARecordType recordType, int fieldId) throws HyracksDataException { if (isClosedFieldNull(recordType, fieldId)) { return 0; } return NonTaggedFormatUtil.getFieldValueLength(bytes, getClosedFieldOffset(recordType, fieldId), getClosedFieldType(recordType, fieldId).getTypeTag(), false); }
public static final boolean isFixedSizedCollection(IAType type) { switch (type.getTypeTag()) { case UNION: if (!((AUnionType) type).isUnknownableType()) { return false; } else { return isFixedSizedCollection(((AUnionType) type).getActualType()); } default: return isFixedSizedCollection(type.getTypeTag()); } }
public static String getStringConstant(ILogicalExpression expr) { final IAObject iaObject = getConstantIaObject(expr, ATypeTag.STRING); return iaObject != null ? ((AString) iaObject).getStringValue() : null; }
public static Boolean getBooleanConstant(ILogicalExpression expr) { final IAObject iaObject = getConstantIaObject(expr, ATypeTag.BOOLEAN); return iaObject != null ? ((ABoolean) iaObject).getBoolean() : null; }