本文整理汇总了Java中org.apache.parquet.schema.OriginalType.TIME_MILLIS属性的典型用法代码示例。如果您正苦于以下问题:Java OriginalType.TIME_MILLIS属性的具体用法?Java OriginalType.TIME_MILLIS怎么用?Java OriginalType.TIME_MILLIS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.parquet.schema.OriginalType
的用法示例。
在下文中一共展示了OriginalType.TIME_MILLIS属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertLogicalType
private OriginalType convertLogicalType(String logicalType) {
if (logicalType == null) {
return null;
} else if (LOGICAL_TYPE_DECIMAL.equals(logicalType)) {
return OriginalType.DECIMAL;
} else if (LOGICAL_TYPE_DATE.equals(logicalType)) {
return OriginalType.DATE;
} else if (LOGICAL_TYPE_TIME_MILLIS.equals(logicalType)) {
return OriginalType.TIME_MILLIS;
// } else if (LOGICAL_TYPE_TIME_MICROS.equals(logicalType)) {
// return OriginalType.TIME_MICROS;
} else if (LOGICAL_TYPE_TIMESTAMP_MILLIS.equals(logicalType)) {
return OriginalType.TIMESTAMP_MILLIS;
// } else if (LOGICAL_TYPE_TIMESTAMP_MICROS.equals(logicalType)) {
// return OriginalType.TIMESTAMP_MICROS;
}
return null;
}
示例2: convertLogicalType
private OriginalType convertLogicalType(LogicalType logicalType) {
if (logicalType == null) {
return null;
} else if (logicalType instanceof LogicalTypes.Decimal) {
return OriginalType.DECIMAL;
} else if (logicalType instanceof LogicalTypes.Date) {
return OriginalType.DATE;
} else if (logicalType instanceof LogicalTypes.TimeMillis) {
return OriginalType.TIME_MILLIS;
} else if (logicalType instanceof LogicalTypes.TimeMicros) {
return OriginalType.TIME_MICROS;
} else if (logicalType instanceof LogicalTypes.TimestampMillis) {
return OriginalType.TIMESTAMP_MILLIS;
} else if (logicalType instanceof LogicalTypes.TimestampMicros) {
return OriginalType.TIMESTAMP_MICROS;
}
return null;
}
示例3: getOriginalType
OriginalType getOriginalType(ConvertedType type) {
switch (type) {
case UTF8:
return OriginalType.UTF8;
case MAP:
return OriginalType.MAP;
case MAP_KEY_VALUE:
return OriginalType.MAP_KEY_VALUE;
case LIST:
return OriginalType.LIST;
case ENUM:
return OriginalType.ENUM;
case DECIMAL:
return OriginalType.DECIMAL;
case DATE:
return OriginalType.DATE;
case TIME_MILLIS:
return OriginalType.TIME_MILLIS;
case TIME_MICROS:
return OriginalType.TIME_MICROS;
case TIMESTAMP_MILLIS:
return OriginalType.TIMESTAMP_MILLIS;
case TIMESTAMP_MICROS:
return OriginalType.TIMESTAMP_MICROS;
case INTERVAL:
return OriginalType.INTERVAL;
case INT_8:
return OriginalType.INT_8;
case INT_16:
return OriginalType.INT_16;
case INT_32:
return OriginalType.INT_32;
case INT_64:
return OriginalType.INT_64;
case UINT_8:
return OriginalType.UINT_8;
case UINT_16:
return OriginalType.UINT_16;
case UINT_32:
return OriginalType.UINT_32;
case UINT_64:
return OriginalType.UINT_64;
case JSON:
return OriginalType.JSON;
case BSON:
return OriginalType.BSON;
default:
throw new RuntimeException("Unknown converted type " + type);
}
}