Search in sources :

Example 1 with IBinaryHashFunctionFamilyProvider

use of org.apache.hyracks.algebricks.data.IBinaryHashFunctionFamilyProvider in project asterixdb by apache.

the class JobGenHelper method variablesToBinaryHashFunctionFamilies.

public static IBinaryHashFunctionFamily[] variablesToBinaryHashFunctionFamilies(Collection<LogicalVariable> varLogical, IVariableTypeEnvironment env, JobGenContext context) throws AlgebricksException {
    IBinaryHashFunctionFamily[] funFamilies = new IBinaryHashFunctionFamily[varLogical.size()];
    int i = 0;
    IBinaryHashFunctionFamilyProvider bhffProvider = context.getBinaryHashFunctionFamilyProvider();
    for (LogicalVariable var : varLogical) {
        Object type = env.getVarType(var);
        funFamilies[i++] = bhffProvider.getBinaryHashFunctionFamily(type);
    }
    return funFamilies;
}
Also used : IBinaryHashFunctionFamilyProvider(org.apache.hyracks.algebricks.data.IBinaryHashFunctionFamilyProvider) LogicalVariable(org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable) IBinaryHashFunctionFamily(org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFamily)

Aggregations

LogicalVariable (org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable)1 IBinaryHashFunctionFamilyProvider (org.apache.hyracks.algebricks.data.IBinaryHashFunctionFamilyProvider)1 IBinaryHashFunctionFamily (org.apache.hyracks.api.dataflow.value.IBinaryHashFunctionFamily)1