Package org.apache.iotdb.db.utils
Class SchemaUtils
- java.lang.Object
-
- org.apache.iotdb.db.utils.SchemaUtils
-
public class SchemaUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcacheTimeseriesSchema(org.apache.iotdb.tsfile.write.schema.TimeseriesSchema schema)static voidcheckDataTypeWithEncoding(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding)static java.lang.ThrowablefindMetaMissingException(java.lang.Throwable currEx)If e or one of its recursive causes is a PathNotExistException or StorageGroupNotSetException, return such an exception or null if it cannot be found.static java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>getAggregatedDataTypes(java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> measurementDataType, java.lang.String aggregation)If the datatype of 'aggregation' depends on 'measurementDataType' (min_value, max_value), return 'measurementDataType' directly, or return a list whose elements are all the datatype of 'aggregation' and its length is the same as 'measurementDataType'.static org.apache.iotdb.tsfile.file.metadata.enums.TSDataTypegetAggregationType(java.lang.String aggregation)static org.apache.iotdb.tsfile.file.metadata.enums.TSDataTypegetSeriesTypeByPath(org.apache.iotdb.commons.path.PartialPath path, java.lang.String aggregation)static java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>getSeriesTypesByPaths(java.util.Collection<? extends org.apache.iotdb.commons.path.PartialPath> paths)static java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType>getSeriesTypesByPaths(java.util.List<MeasurementPath> paths, java.util.List<java.lang.String> aggregations)static booleanisConsistentWithScanOrder(AggregationType aggregationFunction, Ordering scanOrder)judge whether the order of aggregation calculation is consistent with the order of traversing datastatic voidregisterTimeseries(org.apache.iotdb.tsfile.write.schema.TimeseriesSchema schema)static java.util.List<AggregationType>splitPartialAggregation(AggregationType aggregationType)
-
-
-
Method Detail
-
registerTimeseries
public static void registerTimeseries(org.apache.iotdb.tsfile.write.schema.TimeseriesSchema schema)
-
cacheTimeseriesSchema
public static void cacheTimeseriesSchema(org.apache.iotdb.tsfile.write.schema.TimeseriesSchema schema)
-
getSeriesTypesByPaths
public static java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> getSeriesTypesByPaths(java.util.Collection<? extends org.apache.iotdb.commons.path.PartialPath> paths)
-
getAggregatedDataTypes
public static java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> getAggregatedDataTypes(java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> measurementDataType, java.lang.String aggregation)If the datatype of 'aggregation' depends on 'measurementDataType' (min_value, max_value), return 'measurementDataType' directly, or return a list whose elements are all the datatype of 'aggregation' and its length is the same as 'measurementDataType'.- Parameters:
measurementDataType-aggregation-- Returns:
-
getSeriesTypesByPaths
public static java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> getSeriesTypesByPaths(java.util.List<MeasurementPath> paths, java.util.List<java.lang.String> aggregations)
-
getSeriesTypeByPath
public static org.apache.iotdb.tsfile.file.metadata.enums.TSDataType getSeriesTypeByPath(org.apache.iotdb.commons.path.PartialPath path, java.lang.String aggregation)
-
getAggregationType
public static org.apache.iotdb.tsfile.file.metadata.enums.TSDataType getAggregationType(java.lang.String aggregation)
- Parameters:
aggregation- aggregation function- Returns:
- the data type of the aggregation or null if it aggregation is null
-
isConsistentWithScanOrder
public static boolean isConsistentWithScanOrder(AggregationType aggregationFunction, Ordering scanOrder)
judge whether the order of aggregation calculation is consistent with the order of traversing data
-
findMetaMissingException
public static java.lang.Throwable findMetaMissingException(java.lang.Throwable currEx)
If e or one of its recursive causes is a PathNotExistException or StorageGroupNotSetException, return such an exception or null if it cannot be found.- Parameters:
currEx-- Returns:
- null or a PathNotExistException or a StorageGroupNotSetException
-
checkDataTypeWithEncoding
public static void checkDataTypeWithEncoding(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding) throws org.apache.iotdb.commons.exception.MetadataException- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
splitPartialAggregation
public static java.util.List<AggregationType> splitPartialAggregation(AggregationType aggregationType)
-
-