@Override public String toString() { return this.functionIdentifier.getNamespace() + ":" + this.functionIdentifier.getName() + "@" + this.functionIdentifier.getArity(); }
public static String getSimFunction(FunctionIdentifier simFuncId) { if (simFuncId.equals(BuiltinFunctions.SIMILARITY_JACCARD) || simFuncId.equals(BuiltinFunctions.SIMILARITY_JACCARD_CHECK)) { return JACCARD_FUNCTION_NAME; } else if (simFuncId.equals(BuiltinFunctions.EDIT_DISTANCE) || simFuncId.equals(BuiltinFunctions.EDIT_DISTANCE_CHECK)) { return EDIT_DISTANCE_FUNCTION_NAME; } return null; } }
public IncompatibleTypeException(SourceLocation sourceLoc, FunctionIdentifier fid, ATypeTag typeTagLeft, ATypeTag typeTagRight) { super(ErrorCode.COMPILATION_TYPE_INCOMPATIBLE, sourceLoc, fid.getName(), typeTagLeft, typeTagRight); }
@Override public FunctionIdentifier getIdentifier() { return finfo.getFunctionIdentifier(); }
@Override public String toString() { return getNamespace() + ":" + name; }
public FunctionInfo(String namespace, String name, int arity, boolean isFunctional) { this(new FunctionIdentifier(namespace, name, arity), isFunctional); }
@Override public String toString() { return finfo.display(arguments); }
public OverflowException(SourceLocation sourceLoc, FunctionIdentifier fid) { super(ErrorCode.OVERFLOW, sourceLoc, fid.getName()); } }
public FunctionSignature(FunctionIdentifier fi) { this(fi.getNamespace(), fi.getName(), fi.getArity()); }
@Override protected boolean processArgumentsToFunction(FunctionIdentifier fi) { return fi.equals(BuiltinFunctions.GET_ITEM); }
public FunctionIdentifier getFunctionIdentifier() { return finfo.getFunctionIdentifier(); }
public UnderflowException(SourceLocation sourceLoc, FunctionIdentifier fid) { super(ErrorCode.UNDERFLOW, sourceLoc, fid.getName()); } }
public UnsupportedTypeException(FunctionIdentifier fid, ATypeTag actualTypeTag) { super(ErrorCode.COMPILATION_TYPE_UNSUPPORTED, fid.getName(), actualTypeTag); }
public IncompatibleTypeException(FunctionIdentifier fid, ATypeTag typeTagLeft, ATypeTag typeTagRight) { super(ErrorCode.COMPILATION_TYPE_INCOMPATIBLE, fid.getName(), typeTagLeft, typeTagRight); }
public InvalidDataFormatException(SourceLocation sourceLoc, FunctionIdentifier fid, String expectedType) { super(ErrorCode.INVALID_FORMAT, sourceLoc, fid.getName(), expectedType); }
public UnsupportedItemTypeException(SourceLocation sourceLoc, FunctionIdentifier fid, ATypeTag itemTypeTag) { super(ErrorCode.COMPILATION_TYPE_ITEM, sourceLoc, fid.getName(), itemTypeTag); }
public UnsupportedTypeException(SourceLocation sourceLoc, FunctionIdentifier fid, ATypeTag actualTypeTag) { super(ErrorCode.COMPILATION_TYPE_UNSUPPORTED, sourceLoc, fid.getName(), actualTypeTag); }
public UnsupportedItemTypeException(FunctionIdentifier fid, ATypeTag itemTypeTag) { super(ErrorCode.COMPILATION_TYPE_ITEM, fid.getName(), itemTypeTag); }
@Override public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws HyracksDataException { return new AbstractSubBinaryEvaluator(ctx, args, baseOffset, getIdentifier().getName(), sourceLoc) { @Override protected int getSubLength(IFrameTupleReference tuple) { return Integer.MAX_VALUE; } }; } };
@Override public IScalarEvaluator createScalarEvaluator(final IHyracksTaskContext ctx) throws HyracksDataException { return new AbstractFindBinaryEvaluator(ctx, args, baseOffset, getIdentifier().getName(), sourceLoc) { @Override protected int getFromOffset(IFrameTupleReference tuple) { return 0; } }; } };