Class AnalyzeColumnUtils
java.lang.Object
org.apache.drill.exec.metastore.analyze.AnalyzeColumnUtils
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Map<StatisticsKind<?>,
org.apache.calcite.sql.SqlKind> static final Map<StatisticsKind<?>,
TypeProtos.MinorType> static final Map<StatisticsKind<?>,
org.apache.calcite.sql.SqlKind> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getColumnName
(String fullName) Returns actual column name obtained form intermediate name which includes statistics kind and other analyze-specific info.static String
getColumnStatisticsFieldName
(String columnName, StatisticsKind<?> statisticsKind) Returns analyze-specific field name for column statistics which includes actual column name and statistics kind information.static String
getMetadataStatisticsFieldName
(StatisticsKind<?> statisticsKind) Returns analyze-specific field name for metadata statistics which includes statistics kind information.static StatisticsKind<?>
getStatisticsKind
(String fullName) ReturnsStatisticsKind
instance obtained form intermediate field name.static boolean
isColumnStatisticsField
(String fieldName) Checks whether specified field name is analyze-specific field for column statistics.static boolean
isMetadataStatisticsField
(String fieldName) Checks whether specified field name is analyze-specific field for metadata statistics.
-
Field Details
-
COLUMN_STATISTICS_FUNCTIONS
public static final Map<StatisticsKind<?>,org.apache.calcite.sql.SqlKind> COLUMN_STATISTICS_FUNCTIONS -
COLUMN_STATISTICS_TYPES
-
META_STATISTICS_FUNCTIONS
-
-
Constructor Details
-
AnalyzeColumnUtils
public AnalyzeColumnUtils()
-
-
Method Details
-
getColumnName
Returns actual column name obtained form intermediate name which includes statistics kind and other analyze-specific info.Example: column which corresponds to max statistics value for
`o_shippriority`
column iscolumn$maxValue$`o_shippriority`
. This method will return escaped actual column name:`o_shippriority`
.- Parameters:
fullName
- the source of actual column name- Returns:
- actual column name
-
getStatisticsKind
ReturnsStatisticsKind
instance obtained form intermediate field name.- Parameters:
fullName
- the source ofStatisticsKind
to obtain- Returns:
StatisticsKind
instance
-
getColumnStatisticsFieldName
public static String getColumnStatisticsFieldName(String columnName, StatisticsKind<?> statisticsKind) Returns analyze-specific field name for column statistics which includes actual column name and statistics kind information.Example: analyze-specific field name for column
`o_shippriority`
and statisticsMAX_VALUE
is the following:column$maxValue$`o_shippriority`
.- Parameters:
columnName
- name of the columnstatisticsKind
- statistics kind- Returns:
- analyze-specific field name which includes actual column name and statistics kind information
-
getMetadataStatisticsFieldName
Returns analyze-specific field name for metadata statistics which includes statistics kind information.Example: analyze-specific field name for statistics
ROW_COUNT
is the following:metadata$rowCount
.- Parameters:
statisticsKind
- statistics kind- Returns:
- analyze-specific field name for metadata statistics
-
isColumnStatisticsField
Checks whether specified field name is analyze-specific field for column statistics.- Parameters:
fieldName
- name of the field to check- Returns:
true
if specified field name is analyze-specific field for column statistics
-
isMetadataStatisticsField
Checks whether specified field name is analyze-specific field for metadata statistics.- Parameters:
fieldName
- name of the field to check- Returns:
true
if specified field name is analyze-specific field for metadata statistics
-