in odps-sdk-impl/odps-mapred-bridge/src/main/java/com/aliyun/odps/mapred/bridge/WritableRecord.java [209:255]
public Object get(int idx) {
switch (columns[idx].getType()) {
case STRING:
return getString(idx);
case BIGINT:
return getBigint(idx);
case BOOLEAN:
return getBoolean(idx);
case DOUBLE:
return getDouble(idx);
case DATETIME:
return getDatetime(idx);
case DECIMAL:
return getDecimal(idx);
case TINYINT:
return getTinyint(idx);
case SMALLINT:
return getSmallint(idx);
case INT:
return getInt(idx);
case FLOAT:
return getFloat(idx);
case CHAR:
return getChar(idx);
case VARCHAR:
return getVarchar(idx);
case DATE:
return getDate(idx);
case TIMESTAMP:
return getTimestamp(idx);
case BINARY:
return getBinary(idx);
case INTERVAL_DAY_TIME:
return getIntervalDayTime(idx);
case INTERVAL_YEAR_MONTH:
return getIntervalYearMonth(idx);
case STRUCT:
case MAP:
case ARRAY:
if (enableColumnAccessStat) {
columnAccessMark(idx);
}
return values[idx];
default:
throw new RuntimeException("Unsupported type " + columns[idx].getType());
}
}