本文整理匯總了Java中org.apache.kylin.metadata.filter.ExtractTupleFilter類的典型用法代碼示例。如果您正苦於以下問題:Java ExtractTupleFilter類的具體用法?Java ExtractTupleFilter怎麽用?Java ExtractTupleFilter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ExtractTupleFilter類屬於org.apache.kylin.metadata.filter包,在下文中一共展示了ExtractTupleFilter類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: verifyScanWithUnevaluatableFilter
import org.apache.kylin.metadata.filter.ExtractTupleFilter; //導入依賴的package包/類
@Test
public void verifyScanWithUnevaluatableFilter() throws IOException {
GTInfo info = table.getInfo();
CompareTupleFilter fComp = compare(info.colRef(0), FilterOperatorEnum.GT, enc(info, 0, "2015-01-14"));
ExtractTupleFilter fUnevaluatable = unevaluatable(info.colRef(1));
LogicalTupleFilter fNotPlusUnevaluatable = not(unevaluatable(info.colRef(1)));
LogicalTupleFilter filter = and(fComp, fUnevaluatable, fNotPlusUnevaluatable);
GTScanRequest req = new GTScanRequestBuilder().setInfo(info).setRanges(null).setDimensions(null)
.setAggrGroupBy(setOf(0)).setAggrMetrics(setOf(3)).setAggrMetricsFuncs(new String[] { "sum" })
.setFilterPushDown(filter).createGTScanRequest();
// note the unEvaluatable column 1 in filter is added to group by
assertEquals(
"GTScanRequest [range=[[null, null]-[null, null]], columns={0, 1, 3}, filterPushDown=AND [UNKNOWN_MODEL:NULL.GT_MOCKUP_TABLE.0 GT [\\x00\\x00\\x01J\\xE5\\xBD\\x5C\\x00], [null], [null]], aggrGroupBy={0, 1}, aggrMetrics={3}, aggrMetricsFuncs=[sum]]",
req.toString());
doScanAndVerify(table, useDeserializedGTScanRequest(req), "[1421280000000, 20, null, 20, null]",
"[1421280000000, 30, null, 10, null]", "[1421366400000, 20, null, 20, null]",
"[1421366400000, 30, null, 20, null]", "[1421452800000, 10, null, 10, null]");
}
示例2: unevaluatable
import org.apache.kylin.metadata.filter.ExtractTupleFilter; //導入依賴的package包/類
public static ExtractTupleFilter unevaluatable(TblColRef col) {
ExtractTupleFilter r = new ExtractTupleFilter(FilterOperatorEnum.EXTRACT);
r.addChild(new ColumnTupleFilter(col));
return r;
}