Java Code Examples for org.apache.kylin.metadata.model.ColumnDesc#getZeroBasedIndex()

The following examples show how to use org.apache.kylin.metadata.model.ColumnDesc#getZeroBasedIndex() . 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: LookupTableEnumerator.java    From kylin-on-parquet-v2 with Apache License 2.0 6 votes vote down vote up
@Override
public boolean moveNext() {
    boolean hasNext = iterator.hasNext();
    if (hasNext) {
        String[] row = iterator.next();
        for (int i = 0, n = colDescs.size(); i < n; i++) {
            ColumnDesc colDesc = colDescs.get(i);
            int colIdx = colDesc.getZeroBasedIndex();
            if (colIdx >= 0) {
                current[i] = Tuple.convertOptiqCellValue(row[colIdx], colDesc.getUpgradedType().getName());
            } else {
                current[i] = null; // fake column
            }
        }
    }
    return hasNext;
}
 
Example 2
Source File: LookupTableEnumerator.java    From kylin with Apache License 2.0 6 votes vote down vote up
@Override
public boolean moveNext() {
    boolean hasNext = iterator.hasNext();
    if (hasNext) {
        String[] row = iterator.next();
        for (int i = 0, n = colDescs.size(); i < n; i++) {
            ColumnDesc colDesc = colDescs.get(i);
            int colIdx = colDesc.getZeroBasedIndex();
            if (colIdx >= 0) {
                current[i] = Tuple.convertOptiqCellValue(row[colIdx], colDesc.getUpgradedType().getName());
            } else {
                current[i] = null; // fake column
            }
        }
    }
    return hasNext;
}
 
Example 3
Source File: LookupTableEnumerator.java    From Kylin with Apache License 2.0 6 votes vote down vote up
@Override
public boolean moveNext() {
    boolean hasNext = iterator.hasNext();
    if (hasNext) {
        String[] row = iterator.next();
        for (int i = 0, n = colDescs.size(); i < n; i++) {
            ColumnDesc colDesc = colDescs.get(i);
            int colIdx = colDesc.getZeroBasedIndex();
            if (colIdx >= 0) {
                current[i] = Tuple.convertOptiqCellValue(row[colIdx], colDesc.getType().getName());
            } else {
                current[i] = null; // fake column
            }
        }
    }
    return hasNext;
}
 
Example 4
Source File: DictionaryInfo.java    From kylin-on-parquet-v2 with Apache License 2.0 4 votes vote down vote up
public DictionaryInfo(ColumnDesc col, String dataType) {
    this(col.getTable().getIdentity(), col.getName(), col.getZeroBasedIndex(), dataType, null);
}
 
Example 5
Source File: DictionaryInfo.java    From kylin-on-parquet-v2 with Apache License 2.0 4 votes vote down vote up
public DictionaryInfo(ColumnDesc col, String dataType, TableSignature input) {
    this(col.getTable().getIdentity(), col.getName(), col.getZeroBasedIndex(), dataType, input);
}
 
Example 6
Source File: DictionaryInfo.java    From kylin with Apache License 2.0 4 votes vote down vote up
public DictionaryInfo(ColumnDesc col, String dataType) {
    this(col.getTable().getIdentity(), col.getName(), col.getZeroBasedIndex(), dataType, null);
}
 
Example 7
Source File: DictionaryInfo.java    From kylin with Apache License 2.0 4 votes vote down vote up
public DictionaryInfo(ColumnDesc col, String dataType, TableSignature input) {
    this(col.getTable().getIdentity(), col.getName(), col.getZeroBasedIndex(), dataType, input);
}