當前位置: 首頁>>代碼示例>>Java>>正文


Java ExtractTupleFilter類代碼示例

本文整理匯總了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]");
}
 
開發者ID:apache,項目名稱:kylin,代碼行數:23,代碼來源:DictGridTableTest.java

示例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;
}
 
開發者ID:apache,項目名稱:kylin,代碼行數:6,代碼來源:DictGridTableTest.java


注:本文中的org.apache.kylin.metadata.filter.ExtractTupleFilter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。