Search in sources :

Example 1 with PostLocalIndexDDLCompiler

use of org.apache.phoenix.compile.PostLocalIndexDDLCompiler in project phoenix by apache.

the class MetaDataClient method getMutationPlanForBuildingIndex.

private MutationPlan getMutationPlanForBuildingIndex(PTable index, TableRef dataTableRef) throws SQLException {
    MutationPlan mutationPlan;
    if (index.getIndexType() == IndexType.LOCAL) {
        PostLocalIndexDDLCompiler compiler = new PostLocalIndexDDLCompiler(connection, getFullTableName(dataTableRef));
        mutationPlan = compiler.compile(index);
    } else {
        PostIndexDDLCompiler compiler = new PostIndexDDLCompiler(connection, dataTableRef);
        mutationPlan = compiler.compile(index);
    }
    return mutationPlan;
}
Also used : PostIndexDDLCompiler(org.apache.phoenix.compile.PostIndexDDLCompiler) MutationPlan(org.apache.phoenix.compile.MutationPlan) PostLocalIndexDDLCompiler(org.apache.phoenix.compile.PostLocalIndexDDLCompiler)

Aggregations

MutationPlan (org.apache.phoenix.compile.MutationPlan)1 PostIndexDDLCompiler (org.apache.phoenix.compile.PostIndexDDLCompiler)1 PostLocalIndexDDLCompiler (org.apache.phoenix.compile.PostLocalIndexDDLCompiler)1