Java Code Examples for org.apache.kylin.metadata.filter.LogicalTupleFilter#addChildren()
The following examples show how to use
org.apache.kylin.metadata.filter.LogicalTupleFilter#addChildren() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TupleFilterVisitorTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
private TupleFilter getMockFilter1() { LogicalTupleFilter ret = new LogicalTupleFilter(TupleFilter.FilterOperatorEnum.OR); TblColRef colRef1 = TblColRef.newInnerColumn("DEFAULT.TEST_KYLIN_FACT.LSTG_FORMAT_NAME", TblColRef.InnerDataTypeEnum.LITERAL); ret.addChildren(getCompareEQFilter(colRef1, "ABIN")); ret.addChildren(getCompareEQFilter(colRef1, "Auction")); TblColRef colRef2 = TblColRef.newInnerColumn("DEFAULT.TEST_KYLIN_FACT.DEAL_YEAR", TblColRef.InnerDataTypeEnum.LITERAL); ret.addChildren(getCompareEQFilter(colRef2, "2012")); ret.addChildren(getCompareEQFilter(colRef2, "2013")); return ret; }
Example 2
Source File: TupleFilterVisitorTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
private TupleFilter getMockFilter2() { LogicalTupleFilter ret = new LogicalTupleFilter(TupleFilter.FilterOperatorEnum.OR); TblColRef colRef = TblColRef.newInnerColumn("DEFAULT.TEST_KYLIN_FACT.LSTG_FORMAT_NAME", TblColRef.InnerDataTypeEnum.LITERAL); ret.addChildren(getCompareEQFilter(colRef, "ABIN")); ret.addChildren(getCompareEQFilter(colRef, "Auction")); CompareTupleFilter notInFilter = new CompareTupleFilter(TupleFilter.FilterOperatorEnum.NOTIN); notInFilter.addChildren(getCompareEQFilter(colRef, "Auction", "Others")); ret.addChildren(notInFilter); return ret; }
Example 3
Source File: TupleFilterVisitorTest.java From kylin with Apache License 2.0 | 5 votes |
private TupleFilter getMockFilter1() { LogicalTupleFilter ret = new LogicalTupleFilter(TupleFilter.FilterOperatorEnum.OR); TblColRef colRef1 = TblColRef.newInnerColumn("DEFAULT.TEST_KYLIN_FACT.LSTG_FORMAT_NAME", TblColRef.InnerDataTypeEnum.LITERAL); ret.addChildren(getCompareEQFilter(colRef1, "ABIN")); ret.addChildren(getCompareEQFilter(colRef1, "Auction")); TblColRef colRef2 = TblColRef.newInnerColumn("DEFAULT.TEST_KYLIN_FACT.DEAL_YEAR", TblColRef.InnerDataTypeEnum.LITERAL); ret.addChildren(getCompareEQFilter(colRef2, "2012")); ret.addChildren(getCompareEQFilter(colRef2, "2013")); return ret; }
Example 4
Source File: TupleFilterVisitorTest.java From kylin with Apache License 2.0 | 5 votes |
private TupleFilter getMockFilter2() { LogicalTupleFilter ret = new LogicalTupleFilter(TupleFilter.FilterOperatorEnum.OR); TblColRef colRef = TblColRef.newInnerColumn("DEFAULT.TEST_KYLIN_FACT.LSTG_FORMAT_NAME", TblColRef.InnerDataTypeEnum.LITERAL); ret.addChildren(getCompareEQFilter(colRef, "ABIN")); ret.addChildren(getCompareEQFilter(colRef, "Auction")); CompareTupleFilter notInFilter = new CompareTupleFilter(TupleFilter.FilterOperatorEnum.NOTIN); notInFilter.addChildren(getCompareEQFilter(colRef, "Auction", "Others")); ret.addChildren(notInFilter); return ret; }
Example 5
Source File: CubeStorageEngine.java From Kylin with Apache License 2.0 | 5 votes |
private TupleFilter replaceChildren(TupleFilter filter, List<TupleFilter> newChildren) { if (filter instanceof LogicalTupleFilter) { LogicalTupleFilter r = new LogicalTupleFilter(filter.getOperator()); r.addChildren(newChildren); return r; } else throw new IllegalStateException("Cannot replaceChildren on " + filter); }