Java Code Examples for org.apache.kylin.metadata.model.ColumnDesc#getRef()
The following examples show how to use
org.apache.kylin.metadata.model.ColumnDesc#getRef() .
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: CoprocessorRowType.java From kylin-on-parquet-v2 with Apache License 2.0 | 6 votes |
@Override public CoprocessorRowType deserialize(ByteBuffer in) { int n = BytesUtil.readVInt(in); int bodyOffset = BytesUtil.readVInt(in); TblColRef[] cols = new TblColRef[n]; int[] colSizes = new int[n]; for (int i = 0; i < n; i++) { String tableName = BytesUtil.readAsciiString(in); String colName = BytesUtil.readAsciiString(in); String datatype = BytesUtil.readAsciiString(in); TableDesc table = new TableDesc(); table.setName(tableName); ColumnDesc col = new ColumnDesc(); col.setTable(table); col.setName(colName); col.setDatatype(datatype); col.init(table); cols[i] = col.getRef(); int colSize = BytesUtil.readVInt(in); colSizes[i] = colSize; } return new CoprocessorRowType(cols, colSizes, bodyOffset); }
Example 2
Source File: CoprocessorRowType.java From kylin with Apache License 2.0 | 6 votes |
@Override public CoprocessorRowType deserialize(ByteBuffer in) { int n = BytesUtil.readVInt(in); int bodyOffset = BytesUtil.readVInt(in); TblColRef[] cols = new TblColRef[n]; int[] colSizes = new int[n]; for (int i = 0; i < n; i++) { String tableName = BytesUtil.readAsciiString(in); String colName = BytesUtil.readAsciiString(in); String datatype = BytesUtil.readAsciiString(in); TableDesc table = new TableDesc(); table.setName(tableName); ColumnDesc col = new ColumnDesc(); col.setTable(table); col.setName(colName); col.setDatatype(datatype); col.init(table); cols[i] = col.getRef(); int colSize = BytesUtil.readVInt(in); colSizes[i] = colSize; } return new CoprocessorRowType(cols, colSizes, bodyOffset); }
Example 3
Source File: FilterSerializeTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
@Test public void testSerialize05() { ColumnDesc column = new ColumnDesc(); TblColRef colRef = column.getRef(); List<TblColRef> groups = new ArrayList<TblColRef>(); groups.add(colRef); assertFilterSerDe(buildEQCompareFilter(groups, 0)); }
Example 4
Source File: FilterSerializeTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
@Test public void testSerialize06() { ColumnDesc column = new ColumnDesc(); column.setName("META_CATEG_NAME"); TblColRef colRef = column.getRef(); List<TblColRef> groups = new ArrayList<TblColRef>(); groups.add(colRef); assertFilterSerDe(buildEQCompareFilter(groups, 0)); }
Example 5
Source File: FilterSerializeTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
@Test public void testSerialize07() { TableDesc table = new TableDesc(); table.setName("TEST_KYLIN_FACT"); table.setDatabase("DEFAULT"); ColumnDesc column = new ColumnDesc(); column.setTable(table); TblColRef colRef = column.getRef(); List<TblColRef> groups = new ArrayList<TblColRef>(); groups.add(colRef); assertFilterSerDe(buildEQCompareFilter(groups, 0)); }
Example 6
Source File: FilterSerializeTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
@Test public void testSerialize08() { TableDesc table = new TableDesc(); table.setDatabase("DEFAULT"); ColumnDesc column = new ColumnDesc(); column.setTable(table); TblColRef colRef = column.getRef(); List<TblColRef> groups = new ArrayList<TblColRef>(); groups.add(colRef); assertFilterSerDe(buildEQCompareFilter(groups, 0)); }
Example 7
Source File: FilterSerializeTest.java From kylin with Apache License 2.0 | 5 votes |
@Test public void testSerialize05() { ColumnDesc column = new ColumnDesc(); TblColRef colRef = column.getRef(); List<TblColRef> groups = new ArrayList<TblColRef>(); groups.add(colRef); assertFilterSerDe(buildEQCompareFilter(groups, 0)); }
Example 8
Source File: FilterSerializeTest.java From kylin with Apache License 2.0 | 5 votes |
@Test public void testSerialize06() { ColumnDesc column = new ColumnDesc(); column.setName("META_CATEG_NAME"); TblColRef colRef = column.getRef(); List<TblColRef> groups = new ArrayList<TblColRef>(); groups.add(colRef); assertFilterSerDe(buildEQCompareFilter(groups, 0)); }
Example 9
Source File: FilterSerializeTest.java From kylin with Apache License 2.0 | 5 votes |
@Test public void testSerialize07() { TableDesc table = new TableDesc(); table.setName("TEST_KYLIN_FACT"); table.setDatabase("DEFAULT"); ColumnDesc column = new ColumnDesc(); column.setTable(table); TblColRef colRef = column.getRef(); List<TblColRef> groups = new ArrayList<TblColRef>(); groups.add(colRef); assertFilterSerDe(buildEQCompareFilter(groups, 0)); }
Example 10
Source File: FilterSerializeTest.java From kylin with Apache License 2.0 | 5 votes |
@Test public void testSerialize08() { TableDesc table = new TableDesc(); table.setDatabase("DEFAULT"); ColumnDesc column = new ColumnDesc(); column.setTable(table); TblColRef colRef = column.getRef(); List<TblColRef> groups = new ArrayList<TblColRef>(); groups.add(colRef); assertFilterSerDe(buildEQCompareFilter(groups, 0)); }